Ethical Hacking

Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package.
Computer Forensics Training at InfoSec Institute

Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors.




Network Security Secure-Shell
[Top] [All Lists]

Re: password expiring problem

Subject: Re: password expiring problem
Date: Thu, 26 Jul 2007 07:43:16 +1000
Igor Trevisan wrote:
Hi,

I'm trying to setup sshd on an ARM-core-microcontroller based system.
I have a crosscompiled and working version of openssh (V. 4.3p2).
I can successfully start sshd but, when I try to conect from a remote machine
I get:
[password change forced]

From the system logs (ARM board, server) I see that:

Jul 23 12:59:35 freescale auth.info sshd[1816]: User igotre password has expired (root forced)

This means that sshd found a zero in the sp_lstchg field in the /etc/shadow file (if yours has the same layout as mine, it's the field immediately after the encrypted password).


So what's happening is that sshd thinks your password has expired so it runs "passwd", but passwd either isn't clearing the setting that says that the password needs changing, or it's deliberately resetting it.

You can probably work around it by manually editing /etc/shadow to remove the zero from that field.

Does your passwd program actually support the shadow password expiry fields? If you run it from a shell, does it clear the field?

Oh, and since the sp_lstchg field is "days since Jan 1, 1970", does your board have a clock, or does it think it's still in the 70s? If the apparent date is still Jan 1, 1970 that would probably cause passwd to write a zero to that field when a password is changed.

[...]
Jul 23 12:59:35 freescale auth.err sshd[1821]: error: open /dev/tty
failed - could not set controlling tty: Permission denied

That's a separate problem but probably unrelated: the permissions on the /dev/tty device special are probably wrong. It should be mode 666.

--
Darren Tucker (dtucker at zip.com.au)
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4  37C9 C982 80C7 8FF4 FA69
    Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.

<Prev in Thread] Current Thread [Next in Thread>