Category Archives: network

how to configure OPEN LDAP SERVER in centos

Step #1. Requirements

compat-openldap.i386 0:2.1.30-6.4E
openldap-clients.i386 0:2.2.13-6.4E
openldap-devel.i386 0:2.2.13-6.4E
openldap-servers.i386 0:2.2.13-6.4E
openldap-servers-sql.i386 0:2.2.13-6.4E
yum install *openldap* -y
Step #2. Start the service

chkconfig –levels 235 ldap on
service ldap start
Step #3. Create LDAP root user password

# slappasswd

New password:
Re-enter new password:
{SSHA}cWB1VzxDXZLf6F4pwvyNvApBQ8G/DltW

Step #4. Update /etc/openldap/slapd.conf for the root password

vi /etc/openldap/slapd.conf

#68 database bdb
#69 suffix “dc=adminmart,dc=com”
#70 rootdn “cn=Manager,dc=adminmart,dc=com”
#71 rootpw {SSHA}cWB1VzxDXZLf6F4pwvyNvApBQ8G/DltW

Step #5. Apply Changes

service ldap restart
Step #6. Create scalebuzz users

useradd scalebuzz1
passwd scalebuzz1

Changing password for user scalebuzz1.
New UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully.

useradd scalebuzz2
passwd scalebuzz2
Changing password for user scalebuzz2.
New UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
Step #7. Migrate local users to LDAP

grep root /etc/passwd > /etc/openldap/passwd.root
grep test1 /etc/passwd > /etc/openldap/passwd.test1
grep test2 /etc/passwd > /etc/openldap/passwd.test2

Step #9. Convert passwd.file to ldif (LDAP Data Interchange Format) file

/usr/share/openldap/migration/migrate_passwd.pl /etc/openldap/passwd.root /etc/openldap/root.ldif
/usr/share/openldap/migration/migrate_passwd.pl /etc/openldap/passwd.scalebuzz1 /etc/openldap/scalebuzz.ldif
/usr/share/openldap/migration/migrate_passwd.pl /etc/openldap/passwd.scalebuzz2 /etc/openldap/scalebuzz2.ldif

Step #10. Update root.ldif file for the “Manager” of LDAP Server

vi /etc/openldap/root.ldif

#1 dn: uid=root,ou=People,dc=adminmart,dc=com
#2 uid: root
#3 cn: Manager
#4 objectClass: account
Step #11. Create a domain ldif file (/etc/openldap/adminmart.com.ldif)

[[email protected] ~]# cat /etc/openldap/adminmart.com.ldif

dn: dc=adminmart,dc=com
dc: adminmart
description: LDAP Admin
objectClass: dcObject
objectClass: organizationalUnit
ou: rootobject
dn: ou=People, dc=adminmart,dc=com
ou: People
description: Users of adminmart
objectClass: organizationalUnit
Step #12. Import all users in to the LDAP

Add the Domain ldif file

[[email protected] ~]# ldapadd -x -D “cn=Manager,dc=adminmart,dc=com” -W -f /etc/openldap/adminmart.com.ldif

Enter LDAP Password:
adding new entry “dc=adminmart,dc=com”
adding new entry “ou=People, dc=adminmart,dc=com”
Add the users:

[[email protected] ~]# ldapadd -x -D “cn=Manager,dc=adminmart,dc=com” -W -f /etc/openldap/root.ldif

Enter LDAP Password:
adding new entry “uid=root,ou=People,dc=adminmart,dc=com”
adding new entry “uid=operator,ou=People,dc=adminmart,dc=com”
[[email protected] ~]# ldapadd -x -D “cn=Manager,dc=adminmart,dc=com” -W -f /etc/openldap/test1.ldif

Enter LDAP Password:
adding new entry “uid=test1,ou=People,dc=adminmart,dc=com”
[[email protected] ~]# ldapadd -x -D “cn=Manager,dc=adminmart,dc=com” -W -f /etc/openldap/test2.ldif

Enter LDAP Password:
adding new entry “uid=test2,ou=People,dc=adminmart,dc=com”

Step #13. Apply Changes

[[email protected] ~]# service ldap restart
Step #14. Test LDAP Server

It prints all the user information:

[[email protected] ~]# ldapsearch -x -b ‘dc=adminmart,dc=com’ ‘(objectclass=*)’

What is SSL and what is the use of SSL certificates?

SSL:

SSL is known as secure socket layer. It provide standard security for encrypted linkbetween server and client like website, browser, mail server etc.
ssl

SSL allow sensitive information such as credit card number, Social security number and login credentials to be transmitted securely.
ssl2

When we send the data from browser to web server it send in plain text mode that time attacker can intercept all the data and can see the data and information.
To avoid this vulnerability we use SSl certificates. After activate SSL certificate when we send data from broser to web server it convert the plain text into the SSL algorithm which encrypt the data and information both over the network.ssl3
SSL secure lots of peoples data and information over the network every day especially during the online transaction or transmitting the confidential information.
If SSL has activated then it comes in green in address bar.

Where do certificates come in?
ssl4
All browsers have the capability to interact with secured web servers using the SSL protocol. However, the browser and the server need what is called an SSL Certificate to be able to establish a secure connection.

Work of SSL certificate?
learn_ssl_diagram

SSL certificates have a key pair:
Public Key and Private key
This both key work together over the network or browser to encrypt the connection.