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

2007-09-29 Thread Josh Carroll
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
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


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

2007-09-29 Thread Josh Carroll
 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.

Problem solved! In going from 32-bit to 64-bit, my login.conf really
needed to change. I had a default memory limit of 24MB. Which the sshd
user was exceeding at boot time. I recompiled openpam with debugging
enabled, and saw this message in /var/log/debug.log:

Sep 29 22:03:03 pflog sshd[39515]: in openpam_dynamic():
/usr/lib/pam_opieaccess.so: /usr/lib/pam_op
ieaccess.so: mmap of entire address space failed: Cannot allocate memory

That's when I had a major duh moment and realized I should probably
re-examine my login.conf settings. Figured I'd follow up with my
solution, in case others run into it.

Thanks,
Josh
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]