sudo when logged in as a standard user

Some time ago I created a new "admin" user and unchecked "Allow user to administer this computer" for my daily use account ("me") as suggested by Apple. I'm automatically logged in as "me".

Everything works fine. When I install applications or put files into special folders I am asked for authentification. I always put in "admin" and my password.

There is a but. I can't use "sudo" anymore. Whenever I try, I get "me is not in the sudoers file". What I've tried later is "sudo -u admin -s" but after putting in the "admin"-password I get the same error.

Any suggestions?

Thank you!

Mac OS X (10.4.8)

Posted on Mar 1, 2007 5:45 PM

Reply
6 replies

Mar 1, 2007 8:14 PM in response to Barney-15E

..." you can su adminusername which will start a new shell with the admin user's permissions"...

This works, but just be aware that this unlocks most of your preference panes and "Get Info". It probably isn't an issue in most situations, but if the machine is in an accessible location, it would allow what is essentially passwordless "root" access to anyone that happened to walk by the machine within the next 5 minutes, negating the benefit of not using an "admin" account.

Apr 18, 2007 11:50 AM in response to frodo eats apples

I guess this question is considered solved, but what I do seems easier to me: Just login as admin in the Terminal session. I.e., type "login admin" at the shell prompt. Now you have a shell session that belongs to admin even though your console session belongs to your daily account. Using "su admin" also works. Of course you need your admin password twice, to open the shell session and again to use sudo. But you don't have to tamper with sudoers, and you don't have to open a new console session.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

sudo when logged in as a standard user

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.