sshd+pam problem on a fresh 6.2-RELEASE (amd64) install

Josh Carroll josh.carroll at gmail.com
Sat Sep 29 08:29:55 PDT 2007


On a fresh install of FreeBSD 6.2 (amd64), I've run into a problem
with sshd and PAM. When the box first boots up, I cannot ssh in. I am
immediately disconnected. If I look in /var/log/auth.log, I see:

Sep 29 03:20:47 pflog sshd[68798]: in openpam_load_module(): no
pam_opieaccess.so found
Sep 29 03:20:47 pflog sshd[68798]: fatal: PAM: initialisation failed

The /etc/pam.d/sshd file is proper (verified via mergemaster). If I
comment out the lines for the opie and opieaccess module, it fails on
pam_login_access.so instead, with the same error. I also used the
default sshd_config, thinking maybe my customized one was causing a
problem. It had the same problem, however, and does this with or
without UsePAM yes in sshd_config.

Now, here's the weird part: if I restart sshd, it works fine.

As a workaround, I can do something ugly like /etc/rc.d/sshd restart
in another rc script, but would obviously like to avoid this and find
the root cause.

Any ideas? I tried doing an ldd on /usr/lib/pam* inside the
/etc/rc.d/sshd script, but the output is identical when it starts up
on boot as when I restart it. No missing libraries/etc.

Thanks,
Josh


More information about the freebsd-questions mailing list