Skip navigation

Deleted Admin Account on Mac

2793 Views 2 Replies Latest reply: Aug 3, 2013 11:45 AM by rccharles RSS
vijayfromvic Calculating status...
Currently Being Moderated
Aug 3, 2013 1:42 AM

Hi Experts,

 

I am a novice on OSX and while trying to change my user password have managed to remove the only user I have on the system from the Administrator list.

 

Read a post (http://www.hackmac.org/tutorials/from-standard-to-administrator/) which pointed that I can reboot in Single User Mode (by holding down Command+s keys while booting) and go to a command prompt screen.

 

I am using OSX 10.8.4 and tried those key combinations with no luck. Also while fiddling around I enabled Parental controls and now cannot cahnge it back as the Admin account no longer exists.

 

In my Users & Groups I only have one account. Any pointers / help appreciated.

 

Cheers,

MacBook Pro with Retina display, OS X Mountain Lion (10.8.4)
  • MrHoffman Level 6 Level 6 (11,720 points)
    Currently Being Moderated
    Aug 3, 2013 7:13 AM (in response to vijayfromvic)

    Welcome to the forums.

     

    It's unusual that a password change led to a missing or corrupt administrator account, short of direct modifications made to the underlying LDAP database that went awry, or some low-level corruption(s) of LDAP or related.   If the LDAP database is corrupt, all bets are off.  If you're looking at and entering commands from sites such as the one you've linked to, then you're working in areas of the Unix environment that can lead to these sorts of problems.

     

    It's unfortunately too late now, but when you're making changes at this level, it's usually advisable to have a backup or two available, and a recovery disk.  That's the easiest path back out, if (when?) mistakes happen, or if (when?) LDAP gets corrupted either on its own, or due to some errant changes.   Roll in those backups created from before the changes or, if those backups aren't available, create a new backup from another system and try and reinstall OS X, and start over.  Your Mac is new enough to have Internet recovery available.

     

    If things are particularly dire and a straight reinstall doesn't work, then wipe the disk and reinstall OS X.

     

    ⌘S is the sequence for single-user mode and that should work for this case.  (Unless the boot disk is corrupted.)

     

    Target Disk Mode would be one approach for getting a backup, if there's no administrative access and no working bootstrap.  Use another (working) Mac to get the backup.

  • rccharles Level 5 Level 5 (5,150 points)
    Currently Being Moderated
    Aug 3, 2013 11:45 AM (in response to vijayfromvic)

    It's best to have more than one admin account when messing around.  Create other accounts and mess with them.

     

    Shutdown your machine.  Hold down the command + s  key.  Poweron. 

     

    Notice that I hold down command + s then  I power on the machine.

     

    it's hold down the command key the press and hold down the s key.

     

    create a new admin id.

    Get the Mac to set up  an additional administrative account.  You can then change the password on your old account.

     

    Start with your computer power off.  Hold down command-s. Power on your computer.  

     

    Type in the following:

     

    The first two commands will depend on your release of Mac OS X.  Look at what is typed out in the console to determine the exact format.

    # Type the follow two instructions to access the startup disk in read/write. Press return after each command.

    # in case of partial success repeat this command until errors go away.

    /sbin/fsck -fy

    /sbin/mount -uw /

     

    cd /var/db

    pwd

    #List all files. The l is a lower case L.

    ls -a

    #The move command acts as a rename command in this format.

    mv -i  .applesetupdone .applesetupdone.old

     

    # reboot  your mac

    shutdown -r now

     

    Once you've done that the computer reboots and it's like the first time you used the machine. Your old accounts are all safe. From there you just change all other account passwords in the account preferences!!

    Limnos adds detailed explainations:

    http://discussions.apple.com/message.jspa?messageID=8441597#8441597

     

    The above the idea came from a post by JoseAranda at September 9, 2006 3:48 AM

    http://www.askdavetaylor.com/how_do_i_reset_my_mac_os_x_admin_root_password.html

    You will need to scroll down to see this post.  Search for applesetupdone

     

    This method is mentioned in an apple support page without giving an explanation.

     

    Once you have a new administrative account, you can change the password of your old administrative account

    blue apple > System Preferences > Accounts

Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)

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.