can't get ssh to work with NIS - help!

Ian Guthrie ian.l.guthrie at gmail.com
Thu Jun 28 13:36:37 UTC 2007


I am running RHEL5 and can't get ssh to work with NIS.

I get the error:
   Permission denied, please try again.
when I execute:
   ssh ilg at localhost

The error in /var/log/secure is:

   sshd[15593]: pam_unix(sshd:auth): authentication failure; logname= uid=0
euid=0 tty=ssh ruser= rhost=localhost.localdomain  user=ilg
   sshd[15593]: Failed password for ilg from 127.0.0.1 port 1590 ssh2

The /etc/nsswitch.conf has:

   passwd: compat
   shadow: compat
   group:    compat

and I have the appropriate "+" entries in /etc/passwd, /etc/shadow and
/etc/group. I am sure it's not my NIS setup because ypcat and ypmatch all
work.

I am pretty sure that the problem is that PAM is not using the NIS map files
for authentication.

The reason I say this is, when I set "UsePAM no" in /etc/ssh/sshd_config -
then ssh works and I am able to login. In essence bypassing PAM.

or

when I copy the login and password entries for ilg from the NIS source files
to /etc/passwd and /etc/shadow, then ssh works and I am able to login. In
essence bypassing NIS.

How do I make PAM use NIS?

I am using the default /etc/pam.d files that were installed with the system.

Thanks in advance.
-Ian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/pam-list/attachments/20070628/b6bb1070/attachment.htm>


More information about the Pam-list mailing list