0

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 '09 at 13:25
  • 10
    In the movies, they just type "ACCESS OVERRIDE" and they're in, right? – Paul Tomblin Feb 16 '09 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 '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
17

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.

16

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

http://en.wikipedia.org/wiki/Security_by_design

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.

  • 1
    Nice picture :-) ! – Antoine Benkemoun Jul 1 '09 at 6:48
  • +1 for the thousand-word photo. – msanford Jul 23 '09 at 19:55
4

You can't.

  • 5
    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
1

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".

1

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.

0

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

0

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.

0

There is many shell escapes possibles with sudo.

More details : man sudo

0

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
$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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