1

I am trying to control my raspberry pi using ssh in a Windows computer DHCP.

When I try to login with root in my computer it says access denied, so I created a user and tried to login with it from my computer but it says your password has expired change password and login again.

I think it's because my hardware date is set to Jan 1970. So I tried changing the date using the date command and it only changes the system's date. Whenever I try hwclock -w its says hwclock : can't open /dev/misc/rtc : no such file or directory

I listed my /dev/ folders there is not rtc and no misc. I tried to show the logs using dmesg to figure out the file the system uses to get date in boot but I couldn't find anything.

What can I do to find out which file ? Does anyone know why I'm getting the password expired error?

0

The raspberry is a low cost PC/iOT and does not have an RTC by default.

You either set time via NPT in an Internet connected rpi, and/or buy an RTC clock like the DS3231 that costs around 1.25€ in Aliexpress or around £9 in an uk site.

Upon connecting it to the rpi bus, you will be able to use the RTC in Linux after booting.

PS. Be sure to connect it while the rpi is off.

rtc

  • i'm sorry i am new to raspberry pi and linux too. so please correct me if i'm wrong i'm trying to understand. I guess this means that for me to be able to set my hardware clock to my system clock i need to have an RTC module so i guess this also means that i can not login via ssh unless i have an RTC module either that or there is another reason why i get the expired password when i try to login. do you have any idea on why i am getting the password expired message ? – naxcuo Jan 7 '18 at 14:27
  • ah, I got it now. You are making two questions. You should be able to login via ssh by default. Have you put an expiration date in any login? – Rui F Ribeiro Jan 7 '18 at 14:37
  • No i did not i only thought that since i get expired password than maybe it's because my hwclock and my computer's clock have 48years of difference. so i tried the hwclock to change my hwclock and see if it works. [i dont know why i feel like i heard somewhere that default ageing for passwords in linux is 30 years ] – naxcuo Jan 7 '18 at 14:42
  • i went to the shadow file and i had this for my account: nada:blabla/blabla/blabla/:0:0:99999:7::: so i guess this means that the expiration for the password is 273 years. so i really do not understand why i'm having the password expired on the login – naxcuo Jan 9 '18 at 8:19

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.