Previous 1 2 3 Next 35 Replies Latest reply: Jun 12, 2015 7:45 PM by sunilfromnoida Go to original post
  • sinjon2112 Level 1 (35 points)

    Hi Bob


    I've checked my Home folder permissions in Get Info and they are idetical to Admin standby user, ie "Username"(me) Read & Write, staff Read only, everyone, Read only. All the folders except Applications & Public have the red "no entry" icon in the bottom right corner when viewed in Finder from the Admin account.


    Below is the terminal output for id -a


    id -a

    uid=501(nigelmonks) gid=20(staff) groups=20(staff),12(everyone),33(_appstore),61(localaccounts),79(_appserverusr) ,80(admin),

    81(_appserveradm),98(_lpadmin),100(_lpoperator),204(_developer),401( cess_screensharing)


    This is identical to the output for the Admin user account.


    And here is the content of the sudoers file


    # sudoers file.


    # This file MUST be edited with the 'visudo' command as root.

    # Failure to use 'visudo' may result in syntax or file permission errors

    # that prevent sudo from running.


    # See the sudoers man page for the details on how to write a sudoers file.



    # Host alias specification


    # User alias specification


    # Cmnd alias specification


    # Defaults specification

    Defaults          env_reset

    Defaults          env_keep += "BLOCKSIZE"

    Defaults          env_keep += "COLORFGBG COLORTERM"

    Defaults          env_keep += "__CF_USER_TEXT_ENCODING"

    Defaults          env_keep += "CHARSET LANG LANGUAGE LC_ALL LC_COLLATE LC_CTYPE"

    Defaults          env_keep += "LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME"

    Defaults          env_keep += "LINES COLUMNS"

    Defaults          env_keep += "LSCOLORS"

    Defaults          env_keep += "SSH_AUTH_SOCK"

    Defaults          env_keep += "TZ"

    Defaults          env_keep += "DISPLAY XAUTHORIZATION XAUTHORITY"

    Defaults          env_keep += "EDITOR VISUAL"

    Defaults          env_keep += "HOME MAIL"


    # Runas alias specification


    # User privilege specification

    root          ALL=(ALL) ALL

    %admin          ALL=(ALL) ALL


    # Uncomment to allow people in group wheel to run all commands

    # %wheel          ALL=(ALL) ALL


    # Same thing without a password

    # %wheel          ALL=(ALL) NOPASSWD: ALL


    # Samples

    # %users  ALL=/sbin/mount /cdrom,/sbin/umount /cdrom

    # %users  localhost=/sbin/shutdown -h now


    Hope this is of some use, as I've no idea what I'm looking for with this


    Thanks again for your help.

  • BobHarris Level 6 (17,629 points)

    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.

  • sinjon2112 Level 1 (35 points)

    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

  • useEvil Level 1 (0 points)

    This just started happening to me.  My admin account works because I can login with it and even unlock system preferences.  Just sudo does not work.  I've tried changing my admin password but that didn't work.  I tried creating a new admin acount and that didn't work either.

  • ryman242 Level 1 (0 points)


    This seems so roundabout and silly, but it worked for me on Mountain Lion 10.8.2.

  • Alberto Ravasio Level 4 (3,902 points)

    If you type into Terminal




    hit enter. Is your user member of 80(admin) group?

  • christomcfisto Level 1 (0 points)

    did you try "su root" instead of "sudo"

  • sinjon2112 Level 1 (35 points)

    Hi Alberto Ravasio


    I'd pretty much given up on solving this issue until I got notified of a new post here.


    Just used the id command in terminal and my user is a member of 80(admin) group.

  • sinjon2112 Level 1 (35 points)

    Hi christomcfisto, thanks for bringing this thread back to life.


    Just tried su root in terminal and after entering my password I get "sorry"

  • sinjon2112 Level 1 (35 points)

    Hi ryman242 thanks for your suggestion.


    I tried enabling root user as per the article, then tried both sudo and su root commands.


    Both still return the "Sorry, try again" & "Sorry" response respectively.

  • sinjon2112 Level 1 (35 points)

    Hi BobHarris, still struggling with this one.


    I tried changing my password in System Prefs> Users & Groups, but that made no difference.


    When I tried to change my password using "passwd" in Terminal, I got "authentication token failure"


    Any ideas?


    Just to cover your last point, none of my Macs have been linked to any corporate sign in facility.

  • LA440 Level 1 (0 points)

    I have the same issue. Is this a mountain lion bug then?

  • Alberto Ravasio Level 4 (3,902 points)

    su root does not work if root isn't enabled.


    To become root you must issue


    sudo -i

  • grumpy-bear Level 1 (0 points)

    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)


  • Topher Kessler Level 6 (9,865 points)

    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.