. .

Openssh

Add an extra instance of sshd which supporting PAM for Slackware 13.37. The aim as adding extra instance is to enabling pam_ldap for sshd.

System: Slackware 13.37, openssh-5.9p1

> ./configure --prefix=/usr/local/openssh --with-pam --with-md5-passwords --with-pid-dir=/usr/local/openssh/var/run --with-privsep-path=/usr/local/openssh/var/empty
> make
> make install

Modify /usr/local/openssh/etc/sshd_config

  • modify the dameon port
  • Enable UsePAM

Create /etc/pam.d/sshd

#%PAM-1.0
auth       required     /lib64/security/pam_nologin.so
auth       sufficient   /usr/local/pam_ldap/lib/security/pam_ldap.so
auth       required     /lib64/security/pam_unix.so use_first_pass
account    sufficient   /usr/local/pam_ldap/lib/security/pam_ldap.so
account    required     /lib64/security/pam_unix.so
password   required     /lib64/security/pam_cracklib.so
password   sufficient   /usr/local/pam_ldap/lib/security/pam_ldap.so
password   required     /lib64/security/pam_unix.so use_first_pass
session    required     /lib64/security/pam_unix.so