I booted my Raspberry Pi with a buildroot image I generated myself, and now I am trying to connect to raspberry via ssh.

Everything seems to be fine and the raspberry gets connected. But when I try to log in with root it says access denied. So I created a new user, but when I try to login with that user it says that my password expired and that I have to change it.

I went to my shadow file on my rpi and I got this:


This technically means that password would expire 273 years from now.

I thought the problem was that my rpi date is Jan 1970, but I don't understand since expiration is maximised. Do you have any idea on what might be causing this?

  • You cannot login with root remotely. As for the password, are you not sure it is just expired the first time you login, for forcing you to change it? – Rui F Ribeiro Jan 9 '18 at 8:37
  • 2
    check your /etc/shadow file (esp. if you edited it yourself) - I count one too few fields ( the ':' character is the delimiter ) – guiverc Jan 9 '18 at 8:39
  • i tried changing the passwords but connection shuts down right after and nothing changes on my rpi password stays the same. for the /etc/shadow i already mentioned what i had in it for my user nada so i dont know what i have to edit or not cause i guess it is already set to max. – naxcuo Jan 9 '18 at 8:45

here's what i've done :

i changed date on my rpi using the date command and then changed my password again. it worked fine thought when i tried this the first time a few days ago it didn't work i must've spelled something wrong or something. here are the commands :

date -s 1801090852
for "jan 09 2018 at 08:52" there are other formats i was first working with a raspberry pi model B+ (that's broken right now) and the format was 0109085318 so check for the correct syntax.

passwd user to change your user's password.

thank you to those who answered.

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.