The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

CPanel "Sub" User?

Discussion in 'General Discussion' started by Glasswalker, Oct 26, 2005.

  1. Glasswalker

    Glasswalker Member

    Joined:
    Oct 12, 2005
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
    Hello, I have many sites running on my server which runs cpanel/whm... Each domain has it's own username in cpanel, and that is all fine. The problem is that we don't want to give our clients full cpanel access, only access to add/remove/create/edit emails and reset passwords... I know I can do this by limiting the cpanel down to a x-mail theme and limiting the featureset... But we ALSO need full cpanel for our web developers to use on their site... so can I create a "Sub" user under their main user which uses a different theme/featureset, but still has access to the exact same domains and such?

    How would I go about implimenting this?
     
  2. webignition

    webignition Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    1,880
    Likes Received:
    0
    Trophy Points:
    36
    You can't (unfortunately) create sub users as you describe.

    However what you can do is code your own interface and utilise the remote access features. Admittedly this may be a bit of overkill for your situation in terms of how long it would take to implement, nevertheless it would offer you the option of precisely specifying what features are accessible to whom.
     
  3. verdon

    verdon Well-Known Member

    Joined:
    Nov 1, 2003
    Messages:
    836
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Northern Ontario, Canada
    cPanel Access Level:
    Root Administrator
    Could you expand on that a bit, or point to some reference on 'remote access features'?
     
  4. fwwebs

    fwwebs Well-Known Member

    Joined:
    Feb 16, 2004
    Messages:
    329
    Likes Received:
    0
    Trophy Points:
    16
  5. webignition

    webignition Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    1,880
    Likes Received:
    0
    Trophy Points:
    36
    Sure, no problem.

    WHM/cPanel has a method through which scripts running remotely can perform functions for which you would otherwise have to be logged into WHM or cPanel. In this case, remotely refers to scripts that are either running on a different server, or are local but run as a user other than root.

    To user such features, you need to set up a remote access key. This is simply a very long encoded string that, for all intents and purposes, you can consider to be a password. You can generate a remote access key through WHM > Cluster/Remote Access > Setup Remote Access Key.

    You will then be able to code your own PHP or Perl scripts to do some fancy things for you. How to get started with this is explained at:

    http://cpanel.net/remoteaccess-php.html and
    http://cpanel.net/remoteaccess.html

    for PHP and Perl, respectively.
     
  6. webignition

    webignition Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    1,880
    Likes Received:
    0
    Trophy Points:
    36
    I should also add that the standard functions available in the PHP include file and the Perl module don't offer a great deal of functionality but are a very good starting point.

    In order for you to build a full interface, you'd need to use a bit of initiative and take things a couple of steps further.

    I, for example, have a bunch of Perl and PHP scripts sitting in /usr/local/cpanel/whostmrg/docroot/3rdparty/directory/ owned by root:root. When executed, these scripts will run as root, giving you full access to do absolutely anything (more or less - I haven't found any limitations yet on what I want to do). Functions within these scripts are then called by Perl and PHP scripts running as a normal user via the remote access feature. As an example, I use this to check if a chosen domain is being used locally by reading the contents of /etc/localdomains and some other files and echoing the contents, which then gets picked up by a 'remote' script and processed - this itself is then part of an auto-signup process where the user chooses the domain they want to use with their new account and instantly lets the user know if their chosen domain is already being used.
     
  7. verdon

    verdon Well-Known Member

    Joined:
    Nov 1, 2003
    Messages:
    836
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Northern Ontario, Canada
    cPanel Access Level:
    Root Administrator
    awesome... thanks :)
     
Loading...

Share This Page