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 need to run this:

sudo adduser ...

share|improve this question
If you could become the superuser to run an arbitrary command without any permission via sudo that would be really bad -- don't you think. – tvanfosson Feb 16 '09 at 13:25
In the movies, they just type "ACCESS OVERRIDE" and they're in, right? – Paul Tomblin Feb 16 '09 at 13:29
@gnovince My belief is that openness is the best weapon to all kind of problems. Do you know the Linus' law that "given enough eyeballs, all bugs are shallow"? Clearly, the question is more about security than really running "sudo commands without sudo access". – UnixBasics Mar 26 '09 at 0:13
What's the problem? You're not in the sudoers group, or the sudo program doesn't exist? – Henning Jul 23 '09 at 17:19
up vote 17 down vote accepted

Reboot the box in single user mode.

  • If there are no password prompts, edit sudoers to add yourself.

  • If there is a password prompt, reboot system from CD/Floppy/USB disk, mount root drive, edit sudoers

  • If BIOS is locked, remove drive and edit from another system.

  • If case is locked, pick lock (see Google, YouTube, local bookstore). Then see above.

  • Bribe TPTB

  • Use exploit, get root, edit sudoers file.

share|improve this answer

Perhaps, the design of security can help to clarify your question:

Do you really need to be a sudo? Can you circumvent your problem? There is a beautiful picture here about the process:

Manuals have all kind of nice statements about security, but be realistic! Security is a process that you can not buy from a store. If someone finds a security hole in your system, he may be able to run "sudo commands" without being a "sudo".

Your goal is not necessarily to run "sudo commands" at all. Like the picture showed, people tend to cicumvent security measures. Be pragmatic, and please do not try to head towards a brick wall. Hopefully, the links help.

share|improve this answer
Thank you for the links! – Masi Mar 25 '09 at 1:15
Nice picture :-) ! – Antoine Benkemoun Jul 1 '09 at 6:48
+1 for the thousand-word photo. – msanford Jul 23 '09 at 19:55

You can't.

share|improve this answer
With physical access to the box, there's always a way. What you mean is 'you shouldn't'. – Adriano Varoli Piazza Jul 23 '09 at 18:38

It's not clear what you mean, but is the real question "How do I allow users to create other users?" then be careful to not allow "adduser --uid 0 rewt".

share|improve this answer

So do I. I need to run "sudo adduser" on your system so that I can create a user with a UID of 0.

Perhaps we can work out a trade.

share|improve this answer

The answer is in the question, you can't. You'll have to ask the support people to do it for you.

share|improve this answer

Getting sudo access.

Afterwards, you can go to the "FireNUKES" directive that's included in every self-respecting Linux shell.

Ok, no. Reading just the tinniest bit of the shell documentation will help you understand why is this question nonsense.

share|improve this answer

There is many shell escapes possibles with sudo.

More details : man sudo

share|improve this answer

if you have an unlimited sudo, meaning sudo can run any command you can swith to the root user with sudo

$ sudo su -
# adduser  ....
# exit
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.