Ubuntu Login via LDAP integrated AD domain account (LIBNSS-LDAP mode)

Source: Internet
Author: User
Tags ldap ming samaccountname


Ubuntu Login via LDAP integrated AD domain account (LIBNSS-LDAP mode):


# Apt-get Install Libnss-ldap (Middle Direct enter, ignore)



# vi/etc/nsswitch.conf


Passwd:files LDAP

Group:files LDAP

Shadow:files LDAP


: Wq


# vi/etc/ldap.conf



Base dc=ming,dc=com



URI ldap://10.0.0.2


BINDDN cn=ldapadmin,cn=users,dc=ming,dc=com


BINDPW xxxxxxx



(The following default is commented out, need to be enabled)

# RFC 2307 (AD) mappings

Nss_map_objectclass Posixaccount User

Nss_map_objectclass Shadowaccount User

Nss_map_attribute UID sAMAccountName

Nss_map_attribute homedirectory Unixhomedirectory

Nss_map_attribute Shadowlastchange PwdLastSet

Nss_map_objectclass Posixgroup Group

Nss_map_attribute Uniquemember Member

Pam_login_attribute sAMAccountName

Pam_filter Objectclass=user

Pam_password AD


: Wq


#/ETC/INIT.D/LIBNSS-LDAP Restart



Automatically create user home directory after authentication:


# vi/etc/pam.d/common-session


Session Required Pam_mkhomedir.so Skel=/etc/skel umask=0022


: Wq


# getent passwd

# Su-zhi.yang









This article is from the "Linux" blog, so be sure to keep this source http://yangzhiming.blog.51cto.com/4849999/1933593

Ubuntu Login via LDAP integrated AD domain account (LIBNSS-LDAP mode)

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.