openssh: setting sp_expire field in passwd structure?

I’ve been porting the combination of

openssh-3.4p1/openssl-0.9.6g/zlib-1.1.4

and have come across the following problem when attempting to run the
sshd server on QNX 6.2. Server starts up, but when I attempt to log
in (ssh root@qnx.fourwinds.cx), I get the following error message and
logins fail:

“Account root has expired”

I’ve tracked it down in the source to auth.c, line 102. The code
snippet is:

if (spw->sp_expire != -1 && today > spw->sp_expire) {
log(“Account %100s has expired”, pw->pw_name);
return (0);
}

The value of sp_expire is 0 so obviously that fails. In searching
the on-line documentation, it was not obvious to me how to get the
sp_expire field set. My assumption is that a value of -1 means that
it never expires, but the help pages are non-specific.

Is there some value I can set (in /etc/default/password maybe?) to
make sure that either a) the account never expires or b) has an
expiration date somewhere out in the future??

Thanks,

jerry

Jerry Heyman | “Software is the difference between hardware
Amiga forever :frowning: | and reality”
heymanj@acm.org | http://vcard.acm.org/~heymanj

Best to take the source from the 3rd party CDROM, diff it against the
version it is built against and then apply those patches first to 3.4p1 so
that everything will build properly.

Also make sure you build openssl with support for /dev/random.

chris


Jerry’s Home Linux Acct <heymanj@acm.org> wrote:

I’ve been porting the combination of

openssh-3.4p1/openssl-0.9.6g/zlib-1.1.4

and have come across the following problem when attempting to run the
sshd server on QNX 6.2. Server starts up, but when I attempt to log
in (ssh > root@qnx.fourwinds.cx> ), I get the following error message and
logins fail:

“Account root has expired”

I’ve tracked it down in the source to auth.c, line 102. The code
snippet is:

if (spw->sp_expire != -1 && today > spw->sp_expire) {
log(“Account %100s has expired”, pw->pw_name);
return (0);
}

The value of sp_expire is 0 so obviously that fails. In searching
the on-line documentation, it was not obvious to me how to get the
sp_expire field set. My assumption is that a value of -1 means that
it never expires, but the help pages are non-specific.

Is there some value I can set (in /etc/default/password maybe?) to
make sure that either a) the account never expires or b) has an
expiration date somewhere out in the future??

Thanks,

jerry

Jerry Heyman | “Software is the difference between hardware
Amiga forever > :frowning: > | and reality”
heymanj@acm.org > | > http://vcard.acm.org/~heymanj


Chris McKillop <cdm@qnx.com> “The faster I go, the behinder I get.”
Software Engineer, QSSL – Lewis Carroll –
http://qnx.wox.org/

Jerry’s Home Linux Acct <heymanj@acm.org> wrote:

I’ve been porting the combination of

openssh-3.4p1/openssl-0.9.6g/zlib-1.1.4

and have come across the following problem when attempting to run the
sshd server on QNX 6.2. Server starts up, but when I attempt to log
in (ssh > root@qnx.fourwinds.cx> ), I get the following error message and
logins fail:

“Account root has expired”

Maybe it’s the same problem I had when porting OpenSSH to QNX 4.25.
The configure script mistakably assumes that we have a shadow expire
field, which is wrong at least for QNX 4. Try to disable
HAS_SHADOW_EXPIRE in config.h and recompile – it worked for me.

Andreas