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.

Reply via email to