2

I've deleted the two hash files in the folder /private/var/db/shadow/hash/, corresponding to my login account. Now, I cannot login, and don't have any other account on my Mac with sudo permissions.

Is there a way in which I can reset my password? If not, will it be possible to access data belonging to this account? My other accounts do not have permissions to these folders.

  • 2
    can you login using single-user mode? hold command-s on startup. – Robert S Ciaccio Feb 5 '11 at 4:13
  • @calavera: Yes, I can login using single-user mode. Could I reset the password from there? Thanks! – Naweed Chougle Feb 5 '11 at 4:45
  • @Jon: I don't know how to reset the password via command line, but if there's a way to do it via command line you should be able to do it via single-user mode. It logs you on as root. Maybe check man passwd? – Robert S Ciaccio Feb 5 '11 at 4:59
  • @Jon: actually, check out this question: apple.stackexchange.com/questions/34/… – Robert S Ciaccio Feb 5 '11 at 5:03
  • @calavera: Thanks for your comments. I was able to reset my password following the instructions at Reset a user's password in single user mode – Naweed Chougle Feb 5 '11 at 5:24
1

You can boot into the terminal by holding Command + S at startup. You could create a new user via command line this way. Here is a tutorial. Another option is to insert the installation disc and reinstall the Mac OS X.

1

changing my comments to an answer since Jon was able to solve it using single-user mode

Can you login using single-user mode? hold command-s on startup.

I don't know how to reset the password via command line, but if there's a way to do it via command line you should be able to do it via single-user mode. It logs you on as root. Maybe check man passwd?

Also, check out this question: How do I recover the administrator or root password on OS X?

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .