LDAP client Configuration

Source: Internet
Author: User
Tags ldap openldap

#! /Bin/bash # Yum install nss-Pam-ldapd pam_ldap openldap-clients-ysed-I "/^ cachecredentials =/d;/^ useshadow =/d; /^ useldapauth =/d;/^ useldap =/d;/^ usecracklib =/d; /^ configure =/D "/etc/sysconfig/authconfigecho" cachecredentials = yesuseshadow = yesuseldapauth = yesuseldap = yesusecracklib = Authorization = yes ">/etc/sysconfig/authconfiggrep 'session optional Authentication SKEL =/etc/skel umask = 0022 '/etc/PAM. d/system-auth | echo 'session optional pam_mkhomedir.so skel =/etc/skel umask = 100'>/etc/PAM. d/system-authgrep 'auth sufficient pam_ldap.so use_first_pass '/etc/PAM. d/system-auth | echo 'auth sufficient Login Failed [default = bad success = OK user_unknown = ignore] login sufficient login use_authtoksession optional pam_ldap.so '>/etc/PAM. d/system-authgrep 'auth sufficient pam_ldap.so use_first_pass '/etc/PAM. d/password-auth | echo 'auth sufficient Login Failed [default = bad success = OK user_unknown = ignore] login sufficient login use_authtoksession optional login skel =/etc/skel umask = 0022 '>/etc/PAM. d/password-authecho 'base Dc = sky, Dc = comuri LDAP: // 172.18.5.105/SSL notls_cacertdir/etc/OpenLDAP/cacertspam_password md5'>/etc/pam_ldap.conf grep 'ldap: // 172.18.5.105/'/etc/nslcd. conf | echo 'uid nslcdgid ldapuri LDAP: // 172.18.5.105/base Dc = sky, Dc = comssl notls_cacertdir/etc/OpenLDAP/cacerts '>/etc/nslcd. confsed-I "s/^ passwd: files $/passwd: Files ldap/g; S/^ shadow: files $/shadow: Files ldap/g; S/^ group: files $/group: Files ldap/g; "/etc/nsswitch. conf echo 'tls _ cacertdir/etc/OpenLDAP/cacertsuri LDAP: // 172.18.5.105base Dc = sky, Dc = com'>/etc/OpenLDAP/ldap. conf chkconfig -- level 35 nslcd on/etc/init. d/nslcd start #### sudo configgrep 'sudoers: LDAP '/etc/nsswitch. conf | echo 'sudoers: LDAP '>/etc/nsswitch. conf echo 'uri LDAP: // 172.18.5.105sudoers _ base ou = sudoers, Dc = sky, Dc = com'>/etc/sudo-ldap.conf


This article from the "Autumn wind song" blog, please be sure to keep this source http://qiufengsong.blog.51cto.com/7520243/1538679

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.