non-sticky password problem: Debian system with no clock
Hi I run Debian on small embedded ARM boards that have no battery storage, so every time the system boots, the time reverts to Linux time zero. There's one user account, "Useracnt", every time I try to log into it I am instructed to change the password. I've tried the following command from root, which should have set the password to never change:
chage -I -1 -m 0 -M 99999 -E -1 Useracnt But this hasn't helped. I'm just guessing that the absence of a clock is associated with the problem, but it could be something else. Any suggestions on how I can fix this? I can run from root, but it's not a preferred option for obvous reasons. Thanks in advance. |
Maybe it is confused because the time it sees is before the time the password was created. What if you let it revert to time 0, change the password and THEN run your chage command line?
|
Read-Only File System?
|
Could be read only or the operating system runs from RAM. Not enough information...
|
All noted. Thanks, still trying things.
|
IF there is somewhere writable, it is possible to save the current system time at shutdown...
Then during boot reload it. The time still won't be correct - but it will be constantly moving forward. This used to be done when/as the root filesystem got mounted, using the dismount timestamp for the current time. I believe using "date +%m%d%H%Y.%S >shutdown.time" just before dismounting root (assuming it is writable), then using "date `cat shutdown.time`" should set the clock. Of course, if you have a network connection using ntpd would work better. Assuming this was a RaspberryPI or something similar there is (or should be) a RTC available. If you have a log file you could set the date based on that using the -r option (something like date -s `date -r /var/log/logfilename`, or maybe date -s --date="`date -r /var/log/logfilename`"), but you would have to experiment to decide if you need to get it in an acceptable format... (BTW, the date -r uses the modification time of the file, and none of my examples have been tested for correctness.) http://www.thegeekstuff.com/2013/05/...mand-examples/ |
All times are GMT -5. The time now is 03:58 PM. |