is it possible to have 2 root access

dgbaker

Well-Known Member
PartnerNOC
Sep 20, 2002
2,531
9
343
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.
 

hormigo

Well-Known Member
Sep 9, 2002
104
0
166
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 :/
 

hormigo

Well-Known Member
Sep 9, 2002
104
0
166
That's true, but they would only be able to manage accounts under that reseller ID, and not ones owned by root. Correct?
correct :(
I send this feature request to nick, when i know anything i tell you.
 

gic

Well-Known Member
Jun 28, 2002
67
0
156
Originally posted by dgbaker
That's true, but they would only be able to manage accounts under that reseller ID, and not ones owned by root. Correct?
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).
 

Stenny Chong

Well-Known Member
Jun 12, 2002
67
0
156
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: