Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 04-29-2016, 03:59 AM   #1
LQ Newbie
Registered: Jan 2016
Posts: 10

Rep: Reputation: Disabled
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.
Old 04-29-2016, 10:13 AM   #2
LQ Guru
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,946
Blog Entries: 14

Rep: Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161
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?
Old 04-29-2016, 10:31 AM   #3
LQ Addict
Registered: Jan 2011
Posts: 8,562
Blog Entries: 13

Rep: Reputation: Disabled
Read-Only File System?
Old 04-29-2016, 10:44 AM   #4
Registered: Aug 2002
Posts: 16,019

Rep: Reputation: 1850Reputation: 1850Reputation: 1850Reputation: 1850Reputation: 1850Reputation: 1850Reputation: 1850Reputation: 1850Reputation: 1850Reputation: 1850Reputation: 1850
Could be read only or the operating system runs from RAM. Not enough information...
Old 05-01-2016, 06:41 AM   #5
LQ Newbie
Registered: Jan 2016
Posts: 10

Original Poster
Rep: Reputation: Disabled
All noted. Thanks, still trying things.
Old 05-02-2016, 09:28 PM   #6
Senior Member
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,704

Rep: Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270
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.)

Last edited by jpollard; 05-02-2016 at 09:37 PM.


change user, clock, debian, passwords

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Debian system clock unexpected change to wrong time wuwenli Linux - Software 1 03-22-2012 01:48 AM
Password problem with clock applet Debian 4.0 jgz Debian 4 01-23-2008 11:32 PM
System Clock Problem combilli Linux - Software 2 07-05-2007 12:57 PM
Debian in PA-RISC - System Clock is reset to Jan 1970 at bootup wgpaine Linux - General 2 02-07-2004 10:38 AM
help!! system clock problem hyd_lin Linux - General 6 05-30-2003 11:59 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:33 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration