2

I have a Raspberry Pi running Jessie that I'm using as a notification gateway.

If I SSH to it and change the user pi password, it appears to take and when I open a separate SSH session to it it requires the new password. I also create several new users, set their passwords and allow them to sudo with no password.

However, if I reboot I loose all that config changes, the new users and the user pi reverts to the default password, raspberry.

Commands used:

passwd
enter old password:raspberry
enter new password:<new password>
re-enter new password:<new password>

Then initiate a new SSH using the pi user, prompts for password > enter NEW password, access granted

reboot

Initiate SSH using user pi, password prompted > raspberry, access granted

MatsK
  • 2,882
  • 3
  • 17
  • 22

3 Answers3

1

This is exactly how a RW filesystem on a read-only medium looks like. There's no immediate error when you save the file, but the file is not saved after all. Try the raw IO script and see if the data persists: if not, the SD card is end-of-life.

Since it's Jessie we're talking about (presumably connected to the Internet), I'd say it's time to make a back-up and flash an OS which is not outdated. If you can't flash a new OS on that SD card, you'll need to get a new card as well.

Dmitry Grigoryev
  • 28,277
  • 6
  • 54
  • 147
0

I would use exactly the same commands as you did in order to change the password. If that doesn't work I would think that there is a bug in the OS. Like MatsK suggest, I would recommend you the reinstall your OS. I'm not telling you your device has been hacked, but it's not normal anyway.

Belekz
  • 158
  • 9
0

Hint: check your dmesg if it shows any i/o errors preventing your change from being written to SD. Sometimes SDs can be faulty, even fresh off the shelf.

mldevw
  • 21
  • 1