Skip navigation

Password not working with Sudo

15101 Views 34 Replies Latest reply: 2014. 4. 9 오후 9:19 by kalmdown RSS
1 2 3 Previous Next
sinjon2112 Calculating status...
Currently Being Moderated
2012. 9. 3 오전 3:48

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)
  • Barney-15E Level 7 Level 7 (33,275 points)
    Currently Being Moderated
    2012. 9. 3 오전 3:49 (in response to sinjon2112)

    If you are getting only "Sorry, try again" it isn't accepting your password. I'm not sure why not.

    You might try changing your password and see if it will work.

  • Barney-15E Level 7 Level 7 (33,275 points)
    Currently Being Moderated
    2012. 9. 3 오전 4:04 (in response to sinjon2112)

    Check in Console for messages relating to security or sudo and see if it notes anything irregular about your attempts to use sudo.

  • Barney-15E Level 7 Level 7 (33,275 points)
    Currently Being Moderated
    2012. 9. 3 오전 8:59 (in response to sinjon2112)

    I don't know of anything else to check.

    Can you try a very simple, but long (more than 8 character) password. See if that works.

    You can always change it back to something more secure. I'm just wondering if there is something in the password that is causing problems for sudo.

  • Barney-15E Level 7 Level 7 (33,275 points)
    Currently Being Moderated
    2012. 9. 5 오전 4:13 (in response to sinjon2112)

    The basic Repair Permissions in Disk Utility won't affect your user account.

    You can reset your home folder permissions by doing the following:

    Boot into Recovery HD (hold down cmd-r on start).

    When it boots up, go to the Utilities menu and select Terminal.

    Type resetpassword and hit return

    Select the volume (Macintosh HD by default)

    Select your Account

    Click the  Reset Home Folder permissions and ACLs button.

     

    You can quit and restart from there.

  • William Lloyd Level 6 Level 6 (19,205 points)
    Currently Being Moderated
    2012. 9. 5 오전 8:42 (in response to sinjon2112)

    Note that the account and password you're using with 'sudo' must be an ADMIN user account.  Is the username/password that of an admin user, or a standard user?  If it's the latter, it won't work with sudo (sudo is short for "super user do" and a standard user is not a super user in any form of the word ;-)

  • BobHarris Level 6 Level 6 (12,505 points)
    Currently Being Moderated
    2012. 9. 5 오후 5:54 (in response to sinjon2112)

    Generally speaking, 'sudo' takes its clues from the /etc/sudoers file.

     

    Have you tried using System Preferences -> Accounts to reset your account's password?

     

    I'm assuming that you are specifying your logged in account's password for the 'sudo' password prompt.

     

    'sudo' does not need an enabled root account.  root can remain disabled.

  • BobHarris Level 6 Level 6 (12,505 points)
    Currently Being Moderated
    2012. 9. 6 오전 3:51 (in response to sinjon2112)

    Use the standby admin account to look at the /etc/sudoers file to see if there is anything amiss in the file 

     

    Wild guess/idea, check you home Folder's permissions to make sure the do not allow anyone else write access. I know ash refuses to do some things if it thinks someone could put a Trojan file in your home folder. Compare against standby admin.

     

    Check what groups you are in, and compare against standby admin

     

    id -a

     

    There is some difference between the 2 accounts, and what is in /etc/sudoers.

1 2 3 Previous Next

Actions

More Like This

  • Retrieving data ...

Bookmarked By (1)

Legend

  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.