yum -y install openldap-clients
authconfig --enableldap --enablemd5 --enableldapauth --enablelocauthorize --ldapserver="xx.xx.xx.xx" --ldapbasedn="dc=femoo,dc=com" --kickstar
echo 'session required pam_mkhomedir.so umask=0077 skel=/etc/skel/' >> /etc/pam.d/system-auth-ac
echo 'session required pam_mkhomedir.so skel=/etc/skel/ umask=0022' >> /etc/pam.d/login
echo 'session required pam_mkhomedir.so skel=/etc/skel/ umask=0022' >> /etc/pam.d/sshd