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

Password not working with Sudo

Hi, I hope someone can help with this.


I'm trying to run a sudo command in Terminal and when it asks for my password I get "Sorry, try again".


My user account is set up as Admin and I've even tried enabling root user but that didn't make any difference.


The last time I tried sudo was in Snow Leopard and it worked fine. My current install was clean in Lion and then upgraded to 10.8 so there shouldn't be anything hanging around from the old 10.6 install.


Any suggestions as to how I can get my password to work would be appreciated.


Thanks

iMac, OS X Mountain Lion (10.8.1)

Posted on Sep 3, 2012 3:48 AM

Reply
35 replies

Sep 8, 2012 4:53 PM in response to sinjon2112

Everything you have just posted (id -a, /etc/sudoers) all looks good.


And that fact that the alternate Admin account is working, I'm stumped.


How have you reset your password?


via System Preferences -> Accounts (maybe called Users & Groups) ?

or from your terminal session using 'passwd'


if you have tried one, then try the other?


If you have any problems using 'passwd' from your broken account, you can also try it via your alternate Admin account


alt_admin_account's_prompt> sudo passwd broken_account_short_name


I'll also ask some additional stupid questions.


Do you use any corporate domain login stuff with this account? That is to say, was this Mac hooked into your corporate single sign-on login system? If this system is your home system and you did not play with any central login stuff, ignore this question.

Nov 21, 2012 4:56 AM in response to BobHarris

I'm resurrecting this thread because the same problem has happened again.


After trying all the suggestions above, thanks everyone, I finally gave in and did a clean install of Mountain Lion. I didn't migrate anything over from Time Machine or my clone, I just started from scratch and slowly started to add the apps I use the most.


Just recently I needed to use the sudo command in terminal and the same old problem rears it's head, it asks for my password and when I enter it I just get "Sorry try again".


This is only on my user account, which has admin privilidges. When I try on the "spare" admin account it works fine. Even more bizarre, I have three Macs and the same problem exists on all three. All three are running 10.8.2 and were all installed independently of each other.


I'm really stumped/frustrated by this as it's obviously something to do with how I'm using/set up the machines or maybe a piece of software I run.


If anyone has any ideas at all I'd be grateful. Thanks

Apr 9, 2013 5:49 AM in response to sinjon2112

the same problem happened to me this week when I updated my system to mountain lion.

no way to sudo any more

my humble opinion is that mountain lion changed the way it handles the keyboard (I know because I am a VI user!) and my password has accented characters that are generated by double keyboard strike!

what can I do? (I can't even cut/paste my password to sudo)

tanks

Apr 9, 2013 6:58 AM in response to sinjon2112

One thing you can try is to recreate the authentication authority entry for your user account. First be sure you have a backup of your system, and then log into the second admin account and open the Directory Utility in the /System/Library/CoreServices/ folder. Then click the Directory Editor toolbar button and then click the small black lock to authenticate. Then select your faulty user account from the list to the left, and then remove the AuthenticationAuthority entry in its entirety (usually two lines, one that mentions Kerberos and the other that mentions ShadowHash).


Follow this by going to the Users & Groups system preferences, selecting the faulty account, and changing the account's password.


See if that helps the system properly accept the passwords.

Password not working with Sudo

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