• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

2 roots in Linux.... Possible?

I know it can be done in solaris, But it is not recomended. Just vi the /etc/passwd file and under the name you want to change to root Privileges, change the group number to 1. this should give a given login root Privileges.


edit: should be passwd file not shadow
 
Change the user ID to 0. That will give you root privledges, but this is stupid. Just use sudo. What would even give you such an idea?!
 


<< what is sudo? >>



Its like the win2k run-as thingy. I can run things as root without logging in as root, without setting the program setuid, and without having to know the root password.
 
normally, you just have one root account and then you would use 'su' to get root priveledges when you need them.
 


<< what's the difference between sudo and su? i don't have sudo on my system >>



With su you basically log in as root (requires root password). With sudo I use my password to do whichever tasks I am allowed to do (as setup by the /etc/sudoers file) as the user it specifies. I basically type sudo command, enter my password when it asks, and I run that command as root.
 
I am not sure what sudo is, but SU is "Switch User" Type $su - "username" (without ") and then it will prompt for password. you can also do this for root. just type $su <cr> and it will ask for the root password. Syntax may be off, bare with me.
 
Yap sudo is the way to go... if you don't have check your install CD it should be there...

And n0c thanks for that tip. I only started using sudo because of you mentioned it on some
other thread...


Off course if for some strange, completly grey reason you need to have two users with admin
rights you can always add a new user to the root group in /etc/groups I think it's a better solution
than giving him uid 0, of course there are some things that this user won't be allowed to do but
it's an elegant solution.
 
another vote for sudoing... even if you give it full access, it makes a log of commands run. That way you can track stupidity to the source.
 
Compiling the source of sudo is very cool indeed. By default (at least in redhat), i think it sets the alert level to... ermmm... can't remember the level but it's one of the many that go to messages. You can change that to whataver (i like local3) and then set up syslog to pump it into it's own log... very nice for keeping your logs de-cluttered.
 
Back
Top