Boxes are Cool

Q: Guest account requires password - Disabling/reenabling doesn't work

There are many threads here and elsewhere describing an issue where the Guest account suddenly starts prompting for a password, however in my case disabling and reenabling the Guest account (the solution suggested in all of those threads) does not work.

 

When attempting to log into my guest user account via fast app switching the Guest User panel appears as shown below and a loading spinner displays and conintues spinning indefinitely. Also note that an authentication window pops up behind the Guest User panel.

 

Screen Shot 2013-11-29 at 3.34.29 pm.png

 

In order to remove the Guest User panel I have to press the power button once to turn off my screen, wake my computer and then press Cancel (I'm not able to log in to the Guest account with any - or no - password). The screenshot below shows what I see after waking my computer.

 

Screen Shot 2013-11-29 at 3.38.02 pm.png

 

Attepting to log in to the Guest account from the login screen causes the same authentication window as mentioned above to appear, and although this time I am able to enter my password the computer rejects anything I type in. After cancelling the authentication window I am again able to attempt to log into the Guest account, and again no passwords are accepted.

 

I have tried various combinations of restarting my computer and enabling and disabling the Guest account but have had no success. I also tried right clicking the Guest User in System Preferences>Users & Groups, clicking Advanced Options and deleting the entry for the Guest account's home directory. That wasn't my smartest move, as it turns out, as now clicking Advanced Options on the Guest User does nothing. Below is the output from a relevant Terminal command:

 

dscacheutil -q user -a name guest

name: Guest

password: ********

uid: 201

gid: 201

dir: /var/empty

shell: /bin/bash

gecos: Guest User

 

I'd like to try and resolve this without doing a clean install, but obviously that's my last resort. Any help would be greatly appreciated.

MacBook Pro, OS X Mavericks (10.9)

Posted on Nov 28, 2013 6:49 PM

Close

Q: Guest account requires password - Disabling/reenabling doesn't work

  • All replies
  • Helpful answers

Page 1 Next
  • by Linc Davis,

    Linc Davis Linc Davis Nov 29, 2013 11:45 AM in response to Boxes are Cool
    Level 10 (207,963 points)
    Applications
    Nov 29, 2013 11:45 AM in response to Boxes are Cool
    Please read this whole message before doing anything.

    This procedure is a diagnostic test. It’s unlikely to solve your problem. Don’t be disappointed when you find that nothing has changed after you complete it.

    The purpose of the test is to determine whether the problem is caused by third-party software that loads automatically at startup or login, by a peripheral device, by a font conflict, or by corruption of certain system caches.

     

    Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards. Boot in safe mode. Note: If FileVault is enabled on some models, or if a firmware password is set, or if the boot volume is a software RAID, you can’t do this. Ask for further instructions.
       
    Safe mode is much slower to boot and run than normal, and some things won’t work at all, including sound output and  Wi-Fi on certain models. The next normal boot may also be somewhat slow.

    The login screen appears even if you usually log in automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin.

     

    Test while in safe mode. Same problem?

     

    After testing, reboot as usual (i.e., not in safe mode) and verify that you still have the problem. Post the results of the test.
  • by Boxes are Cool,

    Boxes are Cool Boxes are Cool Nov 29, 2013 3:39 PM in response to Linc Davis
    Level 1 (25 points)
    Nov 29, 2013 3:39 PM in response to Linc Davis

    The problem persisted in safe mode, though there were a couple of differences. When attempting to log into the Guest account via Fast User Switching an authentication window no longer appears behind the Guest login panel, and it proceeds immediately to asking me for a password to log in to the Guest account, rather than getting stuck with a spinner, as described above.

     

    Attempting to log in from the login screen is just as it was before, only now the authentication window for iStatServer is not displayed.

     

    After restarting my issue with the iStatServer authentication window displaying when attempting to log into the Guest account appears to have been completely resolved, however I am still prompted for a password when attempting to log in to the Guest account. Disabling and reenabling the Guest account still fails to resolve this issue. The output from the Terminal command shown above is unchanged.

     

    I tried verifying my boot disk's permissions and had a huge list of incorrect permissions returned so I had Disk Utility repair my permissions. Once that was done I was still unable to log into the Guest account, so I had Disk Utility verify my disk. That didn't appear to find anything wrong (though I did run into this issue).

     

    Here's the console output when I use Fast User Switching to attempt to log into the Guest account.

     

    Screen Shot 2013-11-30 at 12.36.11 pm.png

  • by Linc Davis,

    Linc Davis Linc Davis Nov 29, 2013 4:28 PM in response to Boxes are Cool
    Level 10 (207,963 points)
    Applications
    Nov 29, 2013 4:28 PM in response to Boxes are Cool

    Since you seem to be familiar with the shell, I suggest you delete the guest user and recreate it with these parameters:

     

    name: Guest

    password: *

    uid: 201

    gid: 201

    dir: /Users/Guest

    shell: /bin/sh

    gecos: Guest Account

  • by Tom Jones 1999,Helpful

    Tom Jones 1999 Tom Jones 1999 Nov 29, 2013 5:42 PM in response to Boxes are Cool
    Level 1 (10 points)
    Nov 29, 2013 5:42 PM in response to Boxes are Cool

    It may be possible to reset the Guest Account password,

     

    Try:

    sudo passwd Guest

     

    Enter your administrator's password (it won't echo to stdout) and press Enter

     

    You should then be prompted to change the Guest account password. Proceed to do so now by just pressing Enter twice.

     

    Try logging in to the Guest Account now.

  • by Boxes are Cool,

    Boxes are Cool Boxes are Cool Nov 30, 2013 2:20 AM in response to Boxes are Cool
    Level 1 (25 points)
    Nov 30, 2013 2:20 AM in response to Boxes are Cool

    Linc, what's the command for that? Google suggests "sudo dscl . delete /Users/Guest", but given that I've managed to remove the Guest account's home directory I'm not confident that that will work, and I'm loathe to blindly throw sudos at the shell.

     

    Tom, thanks! That worked! But I'm not able to remove the password entirely, just pressing enter as you suggested results in "password unchanged" being echoed. And of course, the Guest account still has no home directory. Interestingly, logging into the Guest account via fast user switching takes me to the login window instead of directly to the Guest account (entering the password at the login screen successfully logs me into the Guest account).

  • by Tom Jones 1999,

    Tom Jones 1999 Tom Jones 1999 Nov 30, 2013 2:38 AM in response to Boxes are Cool
    Level 1 (10 points)
    Nov 30, 2013 2:38 AM in response to Boxes are Cool

    Well, that's very strange behaviour.

    sudo dscl . delete /Users/Guest

    will erase the Guest Account, even if you've removed the home directory.

  • by Boxes are Cool,

    Boxes are Cool Boxes are Cool Nov 30, 2013 2:45 AM in response to Tom Jones 1999
    Level 1 (25 points)
    Nov 30, 2013 2:45 AM in response to Tom Jones 1999

    Will I be able to get it back again? :P If so, how? Just reenable it in System Preferences?

  • by Tom Jones 1999,

    Tom Jones 1999 Tom Jones 1999 Nov 30, 2013 3:02 AM in response to Boxes are Cool
    Level 1 (10 points)
    Nov 30, 2013 3:02 AM in response to Boxes are Cool

    It will probably vanish from System Preferences. To recreate the Guest Account, you will need to execute the following (in order):

     

    sudo dscl . -create /Users/Guest

    sudo dscl . -create /Users/Guest UniqueID 201

    sudo dscl . -create /Users/Guest RealName 'Guest Account'

    sudo dscl . -create /Users/Guest NFSHomeDirectory /Users/Guest

    sudo dscl . -create /Users/Guest PrimaryGroupID 201

    sudo dscl . -create /Users/Guest UserShell /bin/bash

    sudo dscl . -create /Users/Guest 'dsAttrTypeNative:_guest: true'

     

    sudo /usr/sbin/createhomedir -u Guest

  • by Boxes are Cool,

    Boxes are Cool Boxes are Cool Nov 30, 2013 3:12 AM in response to Tom Jones 1999
    Level 1 (25 points)
    Nov 30, 2013 3:12 AM in response to Tom Jones 1999

    Deleting the Guest account caused it to be immediately recreated, but it still has a password, and it's not the one I set earlier. I can now access Advanced Options for the Guest account, but bizzarely the check box for enabling the Guest account is now out of sync with reality. When it's unchecked the Guest account's enabled, when it's checked it's disabled. Entering the commands you listed above simply created a standard account with the name "Guest".

  • by Linc Davis,

    Linc Davis Linc Davis Nov 30, 2013 9:08 AM in response to Boxes are Cool
    Level 10 (207,963 points)
    Applications
    Nov 30, 2013 9:08 AM in response to Boxes are Cool

    Do you know when this problem started, and do you have a backup of your system from before then? Also, what do you get from this command:

    dscl . -list /Users | grep Guest
  • by Boxes are Cool,

    Boxes are Cool Boxes are Cool Nov 30, 2013 2:36 PM in response to Linc Davis
    Level 1 (25 points)
    Nov 30, 2013 2:36 PM in response to Linc Davis

    Yep, I have a fairly good idea, though I can't nail down the precise cause. I recently started in a new job, but as work's sysop's been away they haven't yet sorted a machine for me to use so I've been using my personal one. The day I posted this question I'd been trying to convince pip to install Python 3 versions of libraries (specificially Unirest) rather than OS X's default, Python 2.7. I tried a LOT of things including installing Setup Tools for Python, pip, Unirest, Anaconda and various other bits and pieces which I can't recall at the moment. Needless to say, nothing I did appeared dangerous or looked as if it could cause complications of this nature. I'm still an undergrad, but I have a few clues :-)

     

    I have a Time Machine backup, so there's no real stress, I'd just prefer not to do a restore or a clean install at the moment, and it would be nice to know how to resolve this issue properly. The Guest account isn't essential for me, and I have a workaround in the form of sudo passwd Guest. If nothing comes up here I'll bite the bullet when I have a little more spare time.

     

    That command outputs "Guest".

  • by Linc Davis,Solvedanswer

    Linc Davis Linc Davis Nov 30, 2013 4:17 PM in response to Boxes are Cool
    Level 10 (207,963 points)
    Applications
    Nov 30, 2013 4:17 PM in response to Boxes are Cool

    I suggest you restore the following item from a backup that predates the issue, then reboot and test:

     

    /var/db/dslocal

  • by Boxes are Cool,

    Boxes are Cool Boxes are Cool Dec 9, 2013 1:58 AM in response to Linc Davis
    Level 1 (25 points)
    Dec 9, 2013 1:58 AM in response to Linc Davis

    Sorry for the late reply, I've been pretty busy. I just tried your suggestion and it worked perfectly :-) Out of academic interest, what's the rationale behind the fix? What is that folder used for?

  • by Linc Davis,

    Linc Davis Linc Davis Dec 9, 2013 6:34 AM in response to Boxes are Cool
    Level 10 (207,963 points)
    Applications
    Dec 9, 2013 6:34 AM in response to Boxes are Cool

    That's where the user database is.

Page 1 Next