1

I am newbee at Pi3B. I installed Jessie at Pi3B board.

Whenever I reboot the board, the pi's password was changed into unknown value. So, I delete pi's password encryption field from /etc/password everytime and reset the password. Then the password remains until I reboot. This is stupid. Can anyone tell me what is wrong on the password ?

P.S. I found similar questions in this forum. But, no answers found yet. I am not using WiFi and my ssh and internet work well after I reset the password.

To change the password for pi, I simply used $passwd command. It seems work well. About the password, user-entered passwod is eventually encrypted and wrote onto the /etc/password file. I tried raspi-config to change pi's password, but, still the same problem.

  • 1
    @Totoro DO NOT add detail in comments, edit your question. You need to explain what you mean by "delete pi's password from /etc/password" – Milliways Oct 8 '17 at 7:14
  • 1
    @Milliways: The password is not stored anywhere, of course, but it is possible to delete a field in /etc/passwd and make the account passwordless. Also, a hash of the password (== a one-way encrytion) will appear in that field after you set one, until pwconv is run, at which point it will be replaced with an x. – goldilocks Oct 8 '17 at 14:12
  • 1
    In any case @Totoro this is a non-reproducible problem, meaning anyone else who does the same thing will not have the same result. Either the pi is magically cursed, or you have made a mistake or left out some crucial piece of information. You should try a very simple password (abc123) to make sure there is no mistake, and perhaps run sudo pwconv after you set it to make sure there are no hijinx going on there. – goldilocks Oct 8 '17 at 14:25
  • 1
    The encrypted password is stored in /etc/shadow not in /etc/passwd. – 88weighed Oct 8 '17 at 14:37
  • 1
    How do you reboot the PI? Which command do you use? – NomadMaker May 29 '18 at 4:39
0

[This is a workaround]

I'm not sure why, but the "pi" SSH password seems to be invalidated upon reboot. Eventually I gave up trying to figure out why and how and worked around this by creating my own user. With this user I can logon after reboot.

Not using the default "pi" user for SSH login may seem to be not too bad from a security perspective anyway.

Hope this helps.

PS: I added my user to the groups "sudo" to install software and "audio" to get the Pi to play sound.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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