美文网首页
将Linux主机加入openldap

将Linux主机加入openldap

作者: 指间_流年 | 来源:发表于2017-10-19 17:41 被阅读0次

    一、安装对应软件包

    yum install openldap openldap-clients -y

    yum install -y nss-pam-ldapd pam_ldap

    二、修改配置文件

    执行setup,勾选Authconfig-tui并选中以下选项(若无setup命令,执行yum -y install setuptool)

    [*] Use LDAP

    [*] Use LDAP Authentication

    vi /etc/pam.d/system-auth,进入命令行模式输入(shift+冒号):

    %s/sss/ldap/g

    vi /etc/pam.d/password-auth,进入命令行模式输入(shift+冒号):

    %s/sss/ldap.g

    三、修改ssh配置文件

    vi /etc/pam.d/sshd,进入命令行模式,最后一行输入:

    四、重启相应服务

    service sshd restart

    service nslcd restart

    相关文章

      网友评论

          本文标题:将Linux主机加入openldap

          本文链接:https://www.haomeiwen.com/subject/fxkpuxtx.html