Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I had changed a password for an account titled student with no password by doing this in single user mode,

fsck -fy

mount -uw /

passwd student

The password now is student, but when I try to change back the password to no password again, it says "no changed added". How do I restore it back to no password?

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

From this post.

The passwd command rejects the idea that you can have a 0 length password.

Instead use dscl which is more accepting of the notion that the password is nothing.

dscl . -passwd /Users/foo

You can press enter to make the new password blank and then may get an error and have to enter the old password if you are not root but once you authenticate (or are root already) the blank password will be written.

share|improve this answer
add comment

To delete password from an account issue passwd -d <username>. <- bad. apple does not have this

share|improve this answer
    
When I issued it, it said -d was an illegal option. Perhaps change your syntax? –  sharksfan98 May 16 '13 at 21:19
    
Sorry, mistaken it for linux passwd syntax. Apples store the password info in the /etc/passwd file }which is only used when booting to single user mode. There should be hashed value, which you could simply delete. In the ordinary boot, the passwords are stored in the DirectoryService. –  Fiisch May 16 '13 at 21:24
add comment

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.