Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to create a managed account with root powers and the ability to su as root if need be to manage the box without needing root. What is the correct way to do it?

Does this work?

/usr/sbin/adduser -u 0 -o -g 0 -G 0,1,2,3,4,6,10 -M admin
share|improve this question
Supplementary accounts should never be given a uid or gid of 0. They are effectively two names for the same account at that point. It confuses account name lookups, and in the case of 0 violates most sane expectations of how the server is secured. – Andrew B Feb 6 '13 at 5:57

Following steps will do the needful:

  1. Create a user say PowerUser (/usr/sbin/adduser PowerUser)
  2. Add following line in /etc/sudoers file using visudo

    PowerUser ALL=(ALL) ALL

  3. Read answers of this question.

share|improve this answer
Keep the letters lowercase unless you want to get really confused by things such as mail being normalized to lowercase. – Andrew B Feb 6 '13 at 5:50
Refer to the tool (sudo) used and give an example. Futhermore, depending on the distribution used, it's usually sufficient to add the user to a certain group, wheel, sudo, admins or something like that. – fuero Feb 6 '13 at 7:35

Does this work?

On the level of adding a user that has full control of the system, then yes this works. It is though a bad thing as now you have two accounts with the same UID and GID so for example you have no way of telling who did what - just don't do that.

A better way to do this is to create a normal user and give them access to raised privilege through sudo. You can configure quite fine grained access to the system by configuring the sudoers file with the visudo command.

share|improve this answer

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.