Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

i would like to set all users to be root. How can i do it? I am using ubuntu.

share|improve this question

migrated from stackoverflow.com Mar 7 '11 at 21:17

This question came from our site for professional and enthusiast programmers.

    
Prolly should be moved to Unix/Linux –  Mercfh Mar 7 '11 at 21:15
7  
Whatever you are trying to do, you're most certainly doing it in a very wrong way. –  bytesum Mar 7 '11 at 21:42
    
This could bring new meaning to the "open" part of OpenBSD! =P –  Randolf Richardson Mar 8 '11 at 3:02
    
@Randolf: As soon as Ubuntu stops being Linux, sure. –  grawity Mar 8 '11 at 12:46
1  
No one has asked why you want to do this. Do you want them all to be root, or have root privileges, or be able to su and run certain executables with root privileges etc? That context could steer the answers. –  Rory Alsop Mar 9 '11 at 11:12
add comment

3 Answers 3

There is only one root: root.

If you want to give all users administrative privileges, run this command for each user:

adduser the_accounts_username admin
share|improve this answer
    
Technically, root privileges are determined by the UID zero, not by the "root" username. –  grawity Mar 8 '11 at 12:47
    
Well, I think having the root username is enough in this case. I wouldn't be going around setting 0:0 on random files... –  Blender Mar 9 '11 at 19:03
add comment

Just give everyone the root password.

It is sadly simply not possible to give anyone the same privilegues as root, because root is special, and even overrides all filesystem permissions. If Windows e.g. it is possible to tell Administrator not to go into a directory, and then we won't be able to do that (althought he might give himself the permission).

On Linux root just can do everything. Some things can JUST be done by root, like opening server ports below 1024. No one else can do this. Period.

PS: I don't know WHY you want to do it, but maybe sudo is the way to go. I can't believe you want everyone to do everything. Try to specify what everyone is allowed to do, and add it into the sudo config.

share|improve this answer
add comment

You ought to be a bit more discerning about who you give root privileges to.

Since you're using Ubuntu - and I assume don't want certain users to have to keep sudo'ing everything - you might look at modifying the /etc/sudoers file:

sudo -i
echo 'USERNAME ALL=(ALL) ALL' >> /etc/sudoers

This will allow user with username USERNAME to run any command without sudo'ing.

share|improve this answer
    
It's no good practice to edit the sueders file directly. Use visudo instead. Furthermore your example does not remove the need to type sudo before the actual command. It doesn't even remove the need to enter the password each time. (This would be like "ALL = NOPASSWD: ALL") –  bytesum Mar 7 '11 at 21:39
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.