Anda di halaman 1dari 4

LDAP conguration for RHEL 6 server and Ubuntu 12.04 ...

http://solvedlinuxcong.wordpress.com/2013/01/09/ldap...

solvedlinuxconfig
Sharing the our solutions

LDAP configuration for RHEL 6 server and Ubuntu 12.04 client


SOFTiD LDAP Configuration Domain Name : example.com Host Name : server IP Address : 192.168.1.105 1)Install the required RPMs using yum for LDAP server openldap-servers-2.4.19-15.el6.i686 openldap-clients-2.4.19-15.el6.i686 openldap-devel-2.4.19-15.el6.i686 compat-openldap-2.4.19_2.3.43-15.el6.i686 openldap-2.4.19-15.el6.i686 migrationtools-47-7.el6.noarch 2)Create an encrypted password for LDAP 3) Update the LDAP configuration file vi /etc/openldap/slapd.conf ####################################################################### # ldbm and/or bdb database definitions ####################################################################### database bdb suffix dc=example,dc=com checkpoint 1024 15 rootdn cn=Manager,dc=example,dc=com rootpw {SSHA}+xxxxxxxxxxxxxxxxxxxxxxx (* It is generated from slappasswd command) directory /var/lib/ldap/ 4)Time to test our configuration [root@server ~]# slaptest -u config file testing succeeded 5)Start the LDAP daemon to load the contents of the slapd.conf file # service ldap start

1 of 4

Friday 01 February 2013 04:54 PM

LDAP conguration for RHEL 6 server and Ubuntu 12.04 ...

http://solvedlinuxcong.wordpress.com/2013/01/09/ldap...

6)lets check if our ldap server really works: #ldapsearch -x -b dc=example,dc=com if you get a search: 2 then your on track! 7)Configure the base domain #vi base.ldif dn: dc=example,dc=com dc: ssis objectClass: top objectClass: domain dn: ou=People,dc=example,dc=com ou: People objectClass: top objectClass: organizationalUnit dn: ou=Group,dc=example,dc=com ou: Group objectClass: top objectClass: organizationalUnit now we import our base information to the ldap directory: #ldapadd -x -W -D cn=Manager,dc=example,dc=com -f base.ldif 8)Crete a user account # useradd g users ldaptest # passwd ldaptest Note: The users password must be in LDAP Data Interchange Files (LDIF) format before it can be imported to the LDAP database. 9) Extract the ldaptest user information from the /etc/passwd file and save it for converting to LDIF format # grep ldaptest /etc/passwd > /etc/openldap/passwd.ldaptest 10) If it is freshly configured LDAP database, root user account also needed # grep root /etc/passwd > /etc/openldap/passwd.root 11)Now convert the /etc/passwd data into an LDIF format using the migrate_passwd.pl conversion program lets migrate the users Go to the directory /usr/share/migrationtools. Edit the file # vim /usr/share/migrationtools/migrate_common.ph Set: our domain

Follow

2 of 4

Friday 01 February 2013 04:54 PM

LDAP conguration for RHEL 6 server and Ubuntu 12.04 ...

http://solvedlinuxcong.wordpress.com/2013/01/09/ldap...

# Default DNS domain $DEFAULT_MAIL_DOMAIN = example .com; # Default base $DEFAULT_BASE = dc=ssis,dc=com; ./migrate_passwd.pl /etc/openldap/passwd.root /etc/openldap/root.ldif 12)Import all the three LDIF files ldapadd -x -W -D cn=Manager,dc=example,dc=com -f root.ldif ldapadd x D cn=Manager,dc=example,dc=com W f /etc/openldap/ldaptest.ldif 13)View all the LDAP database entries using the ldapsearch command # ldapsearch -x -b dc=ssis,dc=com (objectclass=*) ***If the test is successful your done*** 14)Configure NFS and share the HOME Dir ___________________________ LDAP Server Configuration Done______________________ LDAP Client Configuration in ubuntu Install the required RPMs using yum for LDAP server 1)apt-get install ldap-utils libpam-ldap libnss-ldap nslcd NOTE: During the installation of the above packages a dialog will pop up and ask about some LDAP configuration. Be sure to enter the correct values for your LDAP configuration. 2)/etc/nsswitch.conf #Original file looks like this passwd: compat group : compat shadow: compat #After appending ldap lines look like these passwd: compat ldap group : compat ldap shadow: compat ldap 3)Comment out the line rootbinddn,# Im not sure why we need to do that. 4) Edit /etc/pam.d/login and add: session required pam_mkhomedir.so skel=/etc/skel umask=0022 5) Edit /etc/pam.d/lightdm and add:
Follow

3 of 4

Friday 01 February 2013 04:54 PM

LDAP conguration for RHEL 6 server and Ubuntu 12.04 ...

http://solvedlinuxcong.wordpress.com/2013/01/09/ldap...

session required pam_mkhomedir.so skel=/etc/skel umask=0022 (Add into last line) auth optional pam_group.so #afterload this module I got the user home(Add under the @include common-auth ) 6)pam-auth-update 7) Issue this command: update-rc.d nslcd enable #By default, Unity login window wont display LDAP users. In order to enable manual login, add this option in /etc/lightdm/lightdm.conf: greeter-show-manual-login=true allow-guest=false greeter-hide-users=true #Add the following option in order to disable users list: Configure the autofs for getting the server home dir modprobe nfs #afterload this module I got the user home Now Try: [root@server ~]#su ldaptest
About these ads

Share this: Like this: Be the first to like this.

This entry was posted in linux and tagged ldap, ldap configuration, ldap server, ldap server configuration, rhel 6 on January 9, 2013 [http://solvedlinuxconfig.wordpress.com/2013/01/09/ldap-configuration-for-rhel6-server-and-ubuntu-12-04-client/] .

Follow

4 of 4

Friday 01 February 2013 04:54 PM

Anda mungkin juga menyukai