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.

is it possible to have 2 root access

Discussion in 'General Discussion' started by silvernetuk, Mar 18, 2003.

  1. silvernetuk

    silvernetuk Well-Known Member

    Joined:
    Sep 2, 2002
    Messages:
    311
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    United Kingdom
    Hi,

    Is it possible to have 2 root access both with different passwords ? if so how ?

    Regards,
    Garry
     
  2. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,578
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Toronto, Ontario Canada
    cPanel Access Level:
    DataCenter Provider
    Hi Garry,

    It is possible and can be done. The one issue with it though is that the /scripts/hackcheck file needs to be modified and chattr +i after modifications.

    If that is exceptable, this is how to do it.

    in SSH.

    1. edit /scripts/hackcheck

    Find the line
    if ($uid == 0 && $user ne "root" && $user ne "toor"

    change it to reflect the new root ID's you want. For example

    if ($uid == 0 && $user ne "root" && $user ne "toor" && $user ne "sprgarry"

    2. save file and exit
    3. create user by doing
    bash# useradd sprgarry
    4. vi /etc/passwd
    5. change entry for sprgarry so that sprgarry:x:?????:????? looks like sprgarry:x:0:?????

    Note leave the group number the way it is, change it's /home/sprgarry to /root/sprgarry and save file

    6. mkdir /root/sprgarry
    7. passwd sprgarry
    8. rm -R /home/sprgarry


    Done. You now have another root equivalant ID.

    This is what we do on all of our servers. None of our admins have the real root accounts passwd and each logs in with their own ID.
     
  3. hormigo

    hormigo Well-Known Member

    Joined:
    Sep 9, 2002
    Messages:
    108
    Likes Received:
    0
    Trophy Points:
    16
    any way to create root account with full access to whm and ssh?

    dgbaker: your faq is excellent but new user only can login by bash, can't access to whm :/
     
  4. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,578
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Toronto, Ontario Canada
    cPanel Access Level:
    DataCenter Provider
    Unfortunatly that is correct, WHM can only have one password and that password is the real root account's password.
     
  5. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    ON, Canada
    If you want someone to have full root access in WHM, you could make them a reseller and in the reseller options you can give them full power.
     
  6. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,578
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Toronto, Ontario Canada
    cPanel Access Level:
    DataCenter Provider
    That's true, but they would only be able to manage accounts under that reseller ID, and not ones owned by root. Correct?
     
  7. hormigo

    hormigo Well-Known Member

    Joined:
    Sep 9, 2002
    Messages:
    108
    Likes Received:
    0
    Trophy Points:
    16
    correct :(
    I send this feature request to nick, when i know anything i tell you.
     
  8. gic

    gic Well-Known Member

    Joined:
    Jun 28, 2002
    Messages:
    69
    Likes Received:
    0
    Trophy Points:
    6
    Nope. That is incorrect. We do this. You can manage accounts that are owned by everyone as long as you select:

    All Features (warning: root access)

    when you setup the reseller. This is how we do it and it works fine. The user can access everything. Then you can just go setup the root access from the instructions above (note: don't create the user again).
     
  9. Stenny Chong

    Stenny Chong Well-Known Member

    Joined:
    Jun 12, 2002
    Messages:
    67
    Likes Received:
    0
    Trophy Points:
    6
    What is the diffirent between real root and this fake root account, any limitation for this second fake root account?

    Thank.

    cPanel.net Support Ticket Number:
     
Loading...

Share This Page