ldap server on linux (open ldap service)

Post on 16-Apr-2017

99 Views

Category:

Technology

3 Downloads

Preview:

Click to see full reader

TRANSCRIPT

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

SamNang LEAP (SNA2017_B)

23

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

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

SamNang LEAP (SNA2017_B)

25

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

top related