"Linux Rookie 2" Ldap

Source: Internet
Author: User
Tags ldap

LDAP Network account


What is 1.LDAP?

LDAP Directory service authentication, similar to Windows Active Directory, is a way to record data

Software required by 2.LDAP clients

Yum Install SSSD krb-workstation-y

3. How to turn on LDAP user authentication

Authconfig-tui

when an error occurs because the TLS certificate is missing, you need to download the required certificate to the server side/etc/openldap/cacerts

Download command:wget http://172.25.254.254/pub/example-ca.crt

< testing >

Getent passwd Ldapuser1

If the user information can be displayed properly, prove that the client authentication is successful

List all users

vim/etc/sssd/sssd.conf

Enumerate = True

Systemctl Restart SSSD

4. Auto-mount Home Directory

because the home directory is not automatically mounted when logging on to the server side

Yum Install Autofs-y

Vim/etc/autofs.master

/HOME/GUESTS/ETC/AUTO.LDAP (boot service read AUTO.LDAP)

Vim/etc/auto.ldap

Ldapuser1 172.25.254.254:/home/guests/ldapuser1 (Automatic mount Ldapuser1)

* 172.25.254.254:/home/guests/& (Auto-mount all users)

Systemctl Restart AutoFS Restart Service

5. Non-interactive access to LDAP account completion

Script Vim set-ldap.sh

#! /bin/bash

Echo " install software ing .... "

Yum Install SSSD krb5-workstation autofs-y &>/dev/null

Echo " Config LDAP auth client ing ... "

Authconfig \

--ENABLELDAP \

--ENZBLEKRB5 \

--disableldapauth \

--ENABLELDAPTLS \

--LDAPLOADCACERT=HTTP://172.25.254.254/PUB/EXAMPLE-CA.CRT \

--ldapserver= " classroom.example.com "  \

--ldapbasedn= " dc=example,dc=com "  \

--krb5realm= " example.com "  \

--krb5kdc= " classroom.example.com "  \

--krb5adminserver= " classroom.example.com "  \

--ENABLESSSD \

--enablesssdauth \

--update

Echo " Comfig LDAP User\ ' s home directory ing ... "

Echo/home/guests/etc/auto.ldap >>/etc/auto.master

Echo " * 172.25.254.254:/home/guests/& " >>/etc/auto.ladp

Systemctl Restart AutoFS

Systemctl Enable AutoFS

Sh set-ldap.sh Execution Script


This article from the "12147236" blog, reproduced please contact the author!

"Linux Rookie 2" Ldap

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.