[No audio]
OpenLDAP installation. This lesson is
actually related to module five, where
we covered what how the users are
created when we need the Active
Directory type of directory services. So
I am including in this module is
because in this module, that's where we
have enabled the networking to talk to
outside world, which is to have internet
enabled. So if you need to go back to
module 5 and review what LDAP, OpenLDAP is,
what are the differences between
each of the directory services, you
should go back and review it and then
you could always come back to this
lesson. Anyway, so, OpenLDAP, what
exactly OpenLDAP is? So OpenLDAP is
basically an open source implementation
of Lightweight Active Directory Access
Protocol, which is also LDAP. It is
developed by OpenLDAP project. So there
is a company which is open source, they
actually do community work, a lot of
people have joined together to build
this product called OpenLDAP. And it is
an internet protocol that email and
other programs like user access use to
look up contact information from the
server. It is released under OpenLDAP
public license. It is available for all
major Linux distributions also AIX,
Android HPUX, OSX, Solaris, and even
Windows are nowadays using OpenLDAP if
there is a need, because it's free, and
you will have to pay Active Directory
for the for that product to Microsoft.
So it is becoming very popular,
especially in Linux world when you have
1000s of users that you need to manage,
and you need to have them access
to many different servers. So that's
pretty much what OpenLDAP is. Now the
OpenLDAP. Once we do the installation,
it's completed, the service that we need
to have enabled and running is called slapd.
To stop and start the service
for OpenLDAP it simply systemctl start
slapd, same thing, if you want to
enable it, meaning if you want the
service to start when your computer or
you when your Linux boot up, then you
have to run the command systemctl
enable slapd. Of course I didn't
include the stop, I'm sure you would know
that. And also you could do the restart
command as well. systemctl restart with
the service name. Where are the
configuration files are located. Once
you have the OpenLDAP installation
successfully completed, then you will
find that in etc/ openldap/slapd.d.
This is the directory where you have
all the configuration files where you
could go in and make changes to it. So
let's go into, let's log into our Linux
machine and we'll go over the
installation of OpenLDAP.
[no audio]
Okay, so I have this Linux machine open. I am
logged in as myself I will become root.
[No audio]
Okay, now, before you go ahead and do
the installation, make sure your Linux
machine can go outside the internet. And
the best way to find out is always do
ping command to ping any server that you
like. And if you get the 64 byte back
and ICMP is coming back with the time to
ping, then it means you can reach it, you
can reach the Google server, Perfect.
Let's clear the screen. Now the command
to install the OpenLDAP is yum install openldap.
I believe it's openldap or
it's probably open-ldap but anyway
we'll try just openldap, and I want to
do asterisk here, and as well as I want to
do asterisk here. The reason I wanted to
put these stars before and after, it
means any package that matches
openldap whether the openldap comes
after the name or before a name, then it
will download all the OpenLDAP
packages. So go ahead hit enter. It's
gonna go out and check all the mirrors
all the repositories that are available
to us. And here, it has a list of all
the OpenLDAP packages or the RPMs. And
then you could see and installing the
packages, you will see right here,
here's a list of all the packages that
it will install on your system. And
here's a quick summary for the
transaction. And you can see the size is
4.5 megabyte. So is this okay? Yes, of
course, you want to install that, so hit
Y and hit enter.
[no audio]
So always first, it downloads the
packages. Once the packages are
downloaded, then it goes through the
installation of those packages. Once
installation is completed, it will clean
up any of the remaining things that it's
not needed, it will clean up, it will
verify the packages are done, it's
installed. And it will give you a quick
summary at the bottom. And when you see
the the message right at the bottom says
Complete, it means it has completed
successfully. So now you have the OpenLDAP
installation completed. Now it's
time to do the configuration. Just one
thing I just want to add quickly, I am
not going to do the complete
installation, or sorry, complete
configuration of the OpenLDAP is
because it requires a lot of work. It is
a completely separate topic because it
could take hours and hours depending on
how you want to configure it based on
your environment. It's just a matter of
OpenLDAP I want you to have some kind
of exposure to it. So you know how to
install it, how does it work, and there
is a way if you need to have some kind
of directory services in your
environment, then that's how you go
about it. So now we have it downloaded, so
let's say if you want to enable start
the service. So you remember the start
to service is systemctl start slapd.
[No audio]
Okay. So it has started and how do you
verify it? You could just do systemctl
status, and you will see that it is up
and running especially when you have
when you using a GUI terminal, you'll see
it is active and running and it is in
green and all the other packages and
package information where those are
located where the file is located.
Everything is here. You could also test
another way that if it has, if the
service or the process is running, and
I'm sure you know by by now, that
command is ps -ef, and then you
grep for slapd. And you will see
right here the first line you will see
ldap /usr/sbin. This is the process that
is running. Again, the second one is just
the process is just a command itself
since I ran the command it is grepping
for itself. So the first one has
verified that we have the OpenLDAP
process it's running. The configuration
file are located in etc/openldap/slapd.d
directory. When you do, when
you go into this directory, you could do
simply ls -l, or ltr. You will see
these are the configuration file, you
will have to go into these configuration
file, modufy it the way you want to, and on
your system on your system local file
system, you will have to actually go to
one more file which is etc and the
file name is nsswitch.conf file. If you
go into that conf file, you will see
right here where it says passwd. See
right here, it says files. It means first,
and every time a user login it will go
to a file, and which file is that? That
file is /etc/passwd, that is a kind
of a local database that is in your
Linux machine or local file that keeps
the inventory of all the users that are
locally created. So the first time you
use logs in, it will always go to the
file and if the user is not found, then
it will go to another one, then you have
to see SSH, you have to replace it with
ldap, ldap, it will go to that ldap
machine, and then it will get
authenticated. Now remember, one thing
that LDAP, we have installed LDAP on the
same machine that we need authentication
from. So this is usually not how the
environment or the scenario works.
Usually system administrators, they
install the OpenLDAP software on
another Linux machine, which becomes a
directory server. And then you could go
in and configure on your client where to
look up for LDAP services, you have to
modify your /etc/host name, and few
other files. And again, as I said
before, there are a few configuration
changes that you would have to make. And
I will include
an article that I have from online one
of the OpenLDAP has the article How to
configure it. So if you really are
interested in configuring OpenLDAP and
your OpenLDAP server, you can review
that article and then you will be able
to configure it. So anyway, hopefully
you have it installed correctly. And now
you understand the clear difference
between all those directories, servers
or services that are out there.
[No audio]