I need to run this:

sudo adduser ...

  • 3
    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, 2009 at 13:25
  • 10
    In the movies, they just type "ACCESS OVERRIDE" and they're in, right? Feb 16, 2009 at 13:29
  • 1
    @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, 2009 at 0:13
  • What's the problem? You're not in the sudoers group, or the sudo program doesn't exist?
    – Henning
    Jul 23, 2009 at 17:19

9 Answers 9


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.


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:

(source: cert.org)

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.

  • 1
    Nice picture :-) ! Jul 1, 2009 at 6:48
  • +1 for the thousand-word photo.
    – msanford
    Jul 23, 2009 at 19:55

You can't.

  • 5
    With physical access to the box, there's always a way. What you mean is 'you shouldn't'. Jul 23, 2009 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".


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.


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


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.


There is many shell escapes possibles with sudo.

More details : man sudo


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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .