login ssh pakai ldap
July 31st, 2015 by Idris
1. install paket:
apt-get install libpam-ldap
2. edit /etc/pam_ldap.conf (terkadang di ubuntu ada yang pakai /etc/ldap.conf) menjadi:
uri ldap://ad.pens.ac.id
binddn uid=user,ou=people,dc=pens,dc=ac,dc=id
base dc=pens,dc=ac,dc=id
bindpw passku
pam_filter &(co=allowSSH) –> sesuaikan dg kebutuhan
port 389
timelimit 30
bind_timelimit 30
pam_login_attribute uid
pam_password exop
3. edit /etc/pam.d/sshd menjadi:
auth required pam_nologin.so
auth sufficient pam_ldap.so
auth sufficient pam_unix.so shadow use_first_pass
auth required pam_deny.so
account sufficient pam_unix.so
account sufficient pam_ldap.so
account required pam_deny.so
session required pam_unix.so
session required pam_mkhomedir.so skel=/etc/skel umask=0022
4. (optional) pastikan /etc/ssh/sshd_config ada syntax berikut (biasanya dibaris paling bawah sendiri):
UsePAM yes
- Posted in Info umum