LDAP Server On Linux (Open LDAP Service)

28
9 Passerelles Numériques Cambodia Date: 19/06/2016 Homework Linux (Open LDAP) 1) Introduction to OpenLDAP: o OpenLDAP is a free, open source implementation of the Light Weight Directory Access protocol (LDAP) developed by the OpenLDAP project. o There are two requirement such as YaST Module for the LDAP Server YaST Module Client. 2) Configure OpenLDAP with GUI: o Open in Terminal > Type: yast lan. o Assign IP address, Subnet Mask and Hostname > Next (Press Alt + N key) SamNang LEAP (SNA2017_B)

Transcript of LDAP Server On Linux (Open LDAP Service)

Page 1: LDAP Server On Linux (Open LDAP Service)

Passerelles Numériques Cambodia Date: 19/06/2016

Homework Linux (Open LDAP)

1) Introduction to OpenLDAP:o OpenLDAP is a free, open source implementation of the Light Weight Directory Access

protocol (LDAP) developed by the OpenLDAP project.o There are two requirement such as YaST Module for the LDAP Server YaST Module Client.2) Configure OpenLDAP with GUI:o Open in Terminal > Type: yast lan.

o Assign IP address, Subnet Mask and Hostname > Next (Press Alt + N key)

SamNang LEAP (SNA2017_B)

1

Page 2: LDAP Server On Linux (Open LDAP Service)

Passerelles Numériques Cambodia Date: 19/06/2016

o Press key alt + S to configure hostname/DNS > Put hostname and domain name > Alt + O to OK

o Type: yast –I to install service open ldap server.

o Type: Search Phrase tab > select nss_ldap, openldap2-client and pam_ldap (Press arrow key and space to select them) > Accept.

SamNang LEAP (SNA2017_B)

2

Page 3: LDAP Server On Linux (Open LDAP Service)

Passerelles Numériques Cambodia Date: 19/06/2016

o Type: rcldap restart to restart ldap service.

o Type: yast to install server and ldap client.

o Configure LDAP Server:

=> Choose Network Services > Choose LDAP Server > Enter.

SamNang LEAP (SNA2017_B)

3

Page 4: LDAP Server On Linux (Open LDAP Service)

Passerelles Numériques Cambodia Date: 19/06/2016

=> Select Yes > Network (Press key Alt + e)

=> Put Domain name (Base DN), Administrator DN name and password LDAP Administrator > Next (Press key Alt + N)

SamNang LEAP (SNA2017_B)

4

Page 5: LDAP Server On Linux (Open LDAP Service)

Passerelles Numériques Cambodia Date: 19/06/2016

=> Press key Alt + F to finish.

o Configure LDAP Client:

=> Choose Network Services > Choose LDAP Client > Enter.

SamNang LEAP (SNA2017_B)

5

Page 6: LDAP Server On Linux (Open LDAP Service)

Passerelles Numériques Cambodia Date: 19/06/2016

=> Select Use LDAP, Put IP address (Domain IP), Domain name (dc=pnc,dc=lan), Select Create Home Directory on Login (Press space key to select it) > Press Alt + A to go to Advanced configuration.

=> Press Alt + m to go to Administration Setting.

SamNang LEAP (SNA2017_B)

6

Page 7: LDAP Server On Linux (Open LDAP Service)

Passerelles Numériques Cambodia Date: 19/06/2016

=> Put user Administrator (cn=Administrator) > Alt + S (Setting).

=> Type password LDAP Server > OK (Alt + O).

3) Create OU: o Create main OU name’s Students

=> Create a file name’s OU.ldif.

SamNang LEAP (SNA2017_B)

7

Page 8: LDAP Server On Linux (Open LDAP Service)

Passerelles Numériques Cambodia Date: 19/06/2016

=> Type: vi OU.ldif (Edit command syntax to run it to create ou).

=> Type the command syntax like below > Save (Press Insert key to edit and Esc and Shift + zz to save)

=> After save this file > Type: ldapadd –x –D cn=Administrator,dc=pnc,dc=lan –W –f OU.ldif to run this command syntax.

=> Type: ldapsearch –x ou=Students to find this OU.

SamNang LEAP (SNA2017_B)

8

Page 9: LDAP Server On Linux (Open LDAP Service)

Passerelles Numériques Cambodia Date: 19/06/2016

o Create sub-OU name’s SNA-B:

=> Edit command syntax like the file below.

=> Run command syntax in this file.

=> Search this OU.

SamNang LEAP (SNA2017_B)

9

Page 10: LDAP Server On Linux (Open LDAP Service)

Passerelles Numériques Cambodia Date: 19/06/2016

4) Create user name’s Samnang in OU name’s SNA-B:o Create file name’s User.ldif.

o Type the command syntax like the file below > Run it to create the user.

o Run this file to create the user.

SamNang LEAP (SNA2017_B)

10

Page 11: LDAP Server On Linux (Open LDAP Service)

Passerelles Numériques Cambodia Date: 19/06/2016

o Search this user

5) Create user name’s Sophann in OU name’s SNA-B:o Edit the command syntax like the file below:

o Run this command file to create the user name’s Sophann.

SamNang LEAP (SNA2017_B)

11

Page 12: LDAP Server On Linux (Open LDAP Service)

Passerelles Numériques Cambodia Date: 19/06/2016

o Search this username.

6) Create group name’s SNA and add the users to this group:o

SamNang LEAP (SNA2017_B)

12

Page 13: LDAP Server On Linux (Open LDAP Service)

Passerelles Numériques Cambodia Date: 19/06/2016

7) Assign password to users:o Type the command like below to change user’s password.

8) Take another client (SUSE) join domain with LDAP Server and take one user to login:

SamNang LEAP (SNA2017_B)

13

Page 14: LDAP Server On Linux (Open LDAP Service)

Passerelles Numériques Cambodia Date: 19/06/2016

o Take SUSE Client join domain with LDAP Serer:

=> Type: yast to configure ldap client.

=> Choose Network Services and LDAP Client > Enter.

=> Select Use LDAP, put IP LDAP Servers, dc=pnc,dc=lan > Press Alt + A (Go to Advanced Configuration)

=> Press key Alt + S (Go to setting).

SamNang LEAP (SNA2017_B)

14

Page 15: LDAP Server On Linux (Open LDAP Service)

Passerelles Numériques Cambodia Date: 19/06/2016

=> Type password LDAP Server and press Alt + O (OK)

=> Press key Alt + O (OK)

SamNang LEAP (SNA2017_B)

15

Page 16: LDAP Server On Linux (Open LDAP Service)

Passerelles Numériques Cambodia Date: 19/06/2016

o Take su username (su Samnang) > Enter

=> Or logout the machine then switch user.

SamNang LEAP (SNA2017_B)

16

Page 17: LDAP Server On Linux (Open LDAP Service)

Passerelles Numériques Cambodia Date: 19/06/2016

9) Take another windows client to join domain and take one user to login:o Take Windows client join domain (Windows XP)

=> Install SAMBA Service on SUSE Linux Server:

=> Type samba into Search phrase tab > Select samba-doc and samba-winbind (Use arrow key and press space to select them) > Accept.

SamNang LEAP (SNA2017_B)

17

Page 18: LDAP Server On Linux (Open LDAP Service)

Passerelles Numériques Cambodia Date: 19/06/2016

=> Type: rcsmb restart and rcnmb restart to restart SAMBA Service.

=> Type yast to configure samba server.

=> Choose Network Services and Samba Server > Enter.

SamNang LEAP (SNA2017_B)

18

Page 19: LDAP Server On Linux (Open LDAP Service)

Passerelles Numériques Cambodia Date: 19/06/2016

=> Put Domain’s name (pnc.lan) > Next (Press Alt + N)

=> Choose primary Domain Controller > Next

SamNang LEAP (SNA2017_B)

19

Page 20: LDAP Server On Linux (Open LDAP Service)

Passerelles Numériques Cambodia Date: 19/06/2016

=> Press key Alt + d to go to Identity

=> Put hostname of machine Linux-Server > Press Alt + L to go to LDAP Settings.

SamNang LEAP (SNA2017_B)

20

Page 21: LDAP Server On Linux (Open LDAP Service)

Passerelles Numériques Cambodia Date: 19/06/2016

=> Assign new password to Administrator > Press key At + T to test connection.

\

=> Verify password Samba > OK

SamNang LEAP (SNA2017_B)

21

Page 22: LDAP Server On Linux (Open LDAP Service)

Passerelles Numériques Cambodia Date: 19/06/2016

=> Ping IP address from Windows XP to Linux-Server (192.168.112.14)

=> Put Domain name > OK > Put username and password of Linux-Server > OK

SamNang LEAP (SNA2017_B)

22

Page 23: LDAP Server On Linux (Open LDAP Service)

Passerelles Numériques Cambodia Date: 19/06/2016

=> Type: smbpasswd –a Sophann to Add user Sophann to Samba.

SamNang LEAP (SNA2017_B)

23

Page 24: LDAP Server On Linux (Open LDAP Service)

Passerelles Numériques Cambodia Date: 19/06/2016

=> Put username and password > Enter

=> The user name Sophann is logged into Windows XP

10) Search all research of objects:

SamNang LEAP (SNA2017_B)

24

Page 25: LDAP Server On Linux (Open LDAP Service)

Passerelles Numériques Cambodia Date: 19/06/2016

SamNang LEAP (SNA2017_B)

25

Page 26: LDAP Server On Linux (Open LDAP Service)

Passerelles Numériques Cambodia Date: 19/06/2016

11) Delete one user from Open LDAP Server:o Type: ldapdelete –W –D cn=Administrator,dc=pnc,dc=lan uid=Samnang,ou=SNA-

B,ou=Students,dc=pnc,dc=lan.

o Now the user name Samnang does not exist.

SamNang LEAP (SNA2017_B)

26

The end