setlogin failed: Function not implemented

Darren Tucker dtucker at
Mon Oct 27 08:39:37 EST 2003

Eivind Magnus Hvidevold wrote:
> I'm using openssh-3.7.1p2 on Linux.
> I keep getting setlogin errors in /var/log/messages:
> Oct 26 18:44:22 giediprime sshd[7774]: Accepted publickey for root from port 39310 ssh2
> Oct 26 18:44:22 giediprime sshd[7776]: error: setlogin failed: Function not implemented

Your C library has a setlogin function so sshd uses it.  It doesn't work
and ssh reports this as an error because, well, it's an error.

Remove HAVE_SETLOGIN from config.h or complain to whoever wrote the C

> Running LFS 4.0. Happens both on 2.6.0-test8 and 2.4.22-ac1.

The kernel version is probably irrelevant, it's the version of the C
library that matters.

> Also noting that there is no #if defined(HAVE_SETLOGIN) or similar
> surrounding the offending call at session.c:1259

On platforms without their own setlogin() the replacement in
openbsd-compat/bsd-misc.c (an empty stub) is used, since libopenbsd-compat
is ahead of libc in the link order.

Darren Tucker (dtucker at
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.

More information about the openssh-unix-dev mailing list