Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

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.

share|improve this question
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! –  Jon 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 –  Jon Feb 5 '11 at 5:24

2 Answers 2

up vote 1 down vote accepted

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.

share|improve this answer

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?

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.