Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

sudo not working?

Hi there,
I'm a bit of a Unix noob and I've hit a problem. It seems like when I'm using the Terminal sudo doesn't work. For instance if I want to copy/make a back up of the crontab file in /private/etc I use sudo cp crontab crontab.bak. I'm then ask for my admin password which I give, but the response is 'Sorry, try again', 3 times until the message 'sudo: 3 incorrect password attempts' is shown.

I am certain the password is right because I use it (with my admin user name) to authenticate certain things when I'm using the GUI front end of OSX (for instance dropping an app into the applications folder).

Sorry if this is a really stupid question, but I'm sure this used to work and now it doesn't.

Thanks,
Steve

G5 Dual 1.8 GHz PPC, Mac OS X (10.4.6), 2GB RAM

Posted on Jun 21, 2006 4:06 PM

Reply
9 replies

Jun 21, 2006 11:29 PM in response to Steve Friend1

Hi Steve,

I am not sure what you did, but maybe it is helpful to know that sudo only works for an "administrator" (at least if you didn't modify some system config files).

A normal user account has insufficient privileges to execute sudo, actually beeing allowed to "sudo" is what makes you an administrator. Administrators are members of the group "admin" and members of this group are allowed to execute sudo. In order to check to which groups you belong use the command "id" in the terminal.

Mario

Jun 22, 2006 5:57 AM in response to Mario_MM

...actually beeing allowed to "sudo" is
what makes you an administrator.


Not really. Any account can be given "sudoers" rights. Apple just chose the admin group as the default. Being in the admin group in NetInfo is what makes you an admin.


Steve -

What you can do is su to your admin account and then use sudo.

user$ su adminUser
Password:
adminuser$ sudo -s
Password:
root#_


PowerBook G4 Mac OS X (10.4.5)

Jun 22, 2006 7:11 AM in response to LittleSaint

ot really. Any account can be given "sudoers"
rights. Apple just chose the admin group as the
default. Being in the admin group in NetInfo is what
makes you an admin.


As I wrote, this is the case for unmodified system files. It doesn't help you if your are in the admin group and not being mentioned in /etc/sudoers.

I don't assume the OP has a modified system.

Mario

Jun 22, 2006 8:07 AM in response to Mario_MM

The point I was making is that sudoers does not define admins on the system. There is a lot of admin functionality that has nothing to do with sudo. In fact, most of the administrative functions (at least the GUI based ones) are handled by /etc/authorization. So, conceivably you could not have any sudoers rights and still administrate a system. I do understand that on a default system the admin group has full sudoers rights, so it could be assumed the two are tied together. However, the two really have nothing to do with each other.

sudo not working?

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