1

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

  • Have you tried to reformat the SD card with a new copy of the OS? – MatsK Jan 14 '18 at 11:52
  • I haven't. it took me weeks to get a Whatsapp gateway to work with Xtool, several scripts and nodered objects. It was my first attempt at Rasbian and I didn't document it very well as I figured it all out. Re-Format would basically be the nuclear option. I was hoping it was me doing something dumb. – David Skilton Jan 14 '18 at 12:58
  • Ok, but now I suspect that you have been hacked. If you have had your system online without changed the passwords at first boot thats like inviting people in... And to use "sudo with no password" is a bad security practice. – MatsK Jan 14 '18 at 13:56
  • 1
    Make sure your microSD card hasn't gone bad. Try writing a file, rebooting and verifying it's actually there. On failures, it can look like everything is working for some time, but the card won't actually store any new data. I do hope you have a backup. – bobstro Jan 18 '18 at 16:46
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.

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.

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.