I’ve been dabbling with Linux for a few months now, and decided it was time to get an official certification. I decided to go for the RHCSA (Red Hat Certified System Administrator) exam, but rather than attending the course, I went for the self-study approach. So I …

I’m not a great fan of exams, but the whole approach of reading the book, then practicing what I’ve just read with some hands on exercises really worked for me. So I went for the exam a few weeks back, and passed ( whoo ! ).


So there are a couple of RHCSA Objectives based around the auto-mounter service and authorisation through an LDAP server. Both subjects are covered in the book, but it’s not possible to get ‘hands on’ without building an LDAP server into the dev environment. And that’s the catch. Connecting to an LDAP server with NFS shares is in the objectives, but building such a server, isn’t.

So I wasted a couple of days Googling LDAP servers, when I should have been studying. I was trying to find an easy way of building an LDAP server that would fit into the environmnet, and match the description provide by the book. I drew a blank.

So now the exam is out of the way, I’ve had another look at the problem, and have come up with a kickstart file which does the job. Building a server from a kickstart file is covered in the objectives, so anyone studying for the exam and wanting to get hands on with an ldap server should be able to build this without too much trouble.


LDAP server build pre-requisites
To build the LDAP server you are going to need…

  • 20 GByte hard disk
  • Network with a DHCP server – the kickstart file specifies DHCP for the build
  • Network with internet access – the kickstart file needs to download the phpldapadmin application during the build

LDAP server Build process:-
The build is fully automated.

LDAP server post build:-
If the build is successful, you will get…

  • LDAP Server name = ldap1.example.com
  • Minimal OU structure
  • CA certificate shared at http://ldap1.example.com/Certificate/slapdcert.pem
  • Five test user accounts ldapuser1 through ldapuser5 passwords all set to qwerty
  • Web interface at ldap1.example.com/ldapadmin (which is way off topic for the RHCSA)
  • Five NFS shares which can be used as home drives for the ldapuser accounts.

Once the server build is complete, it can be moved to any subnet with or without internet access. It’s advisable to assign a static IP to the server.


LDAP client configuration…
This is covered in the book, but watch out for name resolution. The certificates will only work if name resolution has been set up on any client machines. Also don’t forget to open tcp port 389 on the firewall.
So when configuring a client, the settings will look like this…



PHPLDAPADMIN web application…
The admin application can be accessed by browsing to http://ldap1.example.com/ldapadmin.
Logon DN: cn=Manager,dc=example,dc=com
Password: qwerty


Automounter setup…
The LDAP server build provides 5 NFS shares. These are intended for use with the Automounter service. The shared directories are …

  • ldap1.example.com:/home/ldapuser1
  • ldap1.example.com:/home/ldapuser2
  • ldap1.example.com:/home/ldapuser3
  • ldap1.example.com:/home/ldapuser4
  • ldap1.example.com:/home/ldapuser5

The following process maps these NFS shares onto the /ldapshare directory at the client. This alows the five LDAP user accounts to map home drives using the automounter service.

Stage Linux command Notes

yum install -y nfs* autofs

Install the NFS client and automounter service

chkconfig autofs –level 35 on

Set automounter to start at boot

mkdir /ldaphome

Create the directory for the automounter service

nano /etc/auto.master

Scroll down to the end of the file and add the following line.

/ldaphome /etc/auto.home


nano /etc/auto.home

This will create a new file. Either add the following…

ldapuser1 ldap1.example.com:/home/ldapuser1
ldapuser2 ldap1.example.com:/home/ldapuser2
ldapuser3 ldap1.example.com:/home/ldapuser3
ldapuser4 ldap1.example.com:/home/ldapuser4
ldapuser5 ldap1.example.com:/home/ldapuser5

Or, all 5 statements can be compressed into one…

* ldap1.example.com:/home/&


service autofs start

Start the automounter service


7 Responses to RHCSA

  1. Hi tony. Thank you for your comment on my blog. I hated automount and had to force myself to get used to it for my rhcsa exam. Luckily I had few VMs to play with and also where I used to work they set up a test server for me to practice on. Alot of people who took the exam with me were stuck at ldap, automount,nfs and even the basic yum repo setup. All in all, there is simply no way to pass without practice.

  2. Hi Tony,

    Thanks for your kickstart file, it works just fine at once.
    Just what I needed for the final exam prep. I practice a bit.
    The result is a score 250/300 on the exam last week.
    Yes I got the quistion of the automounter, just scored all points !

    Thanks again !

    Ronald. (RHCSA certified)

    • Hi sorry for the delay in picking up your comment – my web site doesn’t seem to be alerting me to incoming messages any more. I guess thats something else for me to fix at the weekend 🙁

      Glad to hear you found the file usefull, and well done on the result, I think you may have scored a bit better than me.

  3. Hi Tony

    Just wanted to say thanks for a really useful page. I’ve got about 3 weeks out to the RHCSA exam and had spent far too much time trying to configure an LDAP server without sucess.

    This page has help a lot and saved me precious time.

  4. Hi all,

    I took my rhcsa exam today and failed 🙁 I was stuck in exactly this three parts, ldap, nfs and automounter. Any chance I could do a skype section with someone to clear this up for me please? thank you. Please email me christian10862@gmail.com.

    • Hi Christian. I don’t think I would be much help with this – I’ve mostly been working on Windoze equipment since my RHCSA, so I have forgotten all the relavent detail.