Operating System - HP-UX
1827688 Members
4122 Online
109967 Solutions
New Discussion

Could exists two users root?

 
SOLVED
Go to solution
Carme Torca
Super Advisor

Could exists two users root?

Hi,

Could exists two users root? How can I create two roots?

Thanks,
Carmen.
Users are not too bad ;-)
5 REPLIES 5
John Palmer
Honored Contributor
Solution

Re: Could exists two users root?

Hi,

You can't have two users called 'root' but you can have as mny users as you like that have a User Id of 0 (third field of /etc/passwd).

These users are effectively 'root' and can have their own passwords. They can be useful in certain circumstances but are generally frowned upon as security risks.

Regards,
John
T G Manikandan
Honored Contributor

Re: Could exists two users root?

root::0:3::/:/sbin/sh

This is the root entry in the password file.
Just create another user with uid 0 in the password file so that he has the same privileges as root.
mani::0:3::/mani:/sbin/sh

Edit your passwd file for the same.
I have mentioned a different home-dir for the user (/mani)
Make sure you create a directory as home-dir.

Clemens van Everdingen
Honored Contributor

Re: Could exists two users root?

Hi,

No ! You could have more users with uid 0 but this implicates security risks.

I remember one thread where Bill Hassel explained very well why not to do this.

You could search the froum on this issue.

C.
The computer is a great invention, there are as many mistakes as ever, but they are nobody's fault !
Clemens van Everdingen
Honored Contributor

Re: Could exists two users root?

Hi,

Found the thread already !

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x73a5ba808b46d611abda0090277a778c,00.html

C.
The computer is a great invention, there are as many mistakes as ever, but they are nobody's fault !
Chuck J
Valued Contributor

Re: Could exists two users root?

You can directly edit /etc/passwd and create a new user with the user id of 0. It's a little dangerous though, and you'd probabaly only want to do it on say a workstation or something. I would also recommend making a backup copy of /etc/passwd before you do this.

cp /etc/passwd /etc/passwd.bak