Click to See Complete Forum and Search --> : adding users to a group at command level


randy-e
06-09-2009, 12:44 PM
Hello,

I just added myself to the root group with the following command:

# /usr/sbin/usermod -G root,osas randy

but it has not taken affect, i am still not able to enter a directory where only the owner and group are root and only root has the rights to enter it while logged in as randy. I need for it to take affect without rebooting the server. Also i need to be able to do it at command level, not thru any gui stuff.

thanks

ph34r
06-09-2009, 02:26 PM
Group membership changes don't kick in until the user has logged out completely and logs back in. You don't need to reboot - just completely log out.

randy-e
06-09-2009, 02:52 PM
thanks

Satanic Atheist
06-09-2009, 03:19 PM
Not entirely sure if this will work. Anyway, it's inadvisable for the same reasons people argue about logging in as root.

I think the Linux security model will prevent anyone without an effective UID of 0 (root's UID and GID) from attaining root privileges.

If you need more than one root account, many years ago, I did create a "root2" account for someone else to use and I believe I simply gave it a UID and GID of 0 in /etc/passwd. I believe this is all I did and it worked.

James