0% found this document useful (0 votes)
118 views

LDAP Client Configuration With Autofs Home Directories

This document provides instructions for configuring an LDAP client with autofs home directory mounts on CentOS. It describes installing required packages like openldap-clients, nss-pam-ldapd and sssd. The LDAP server details can then be configured using either the GUI tool system-config-authentication or the CLI tool authconfig-tui. Autofs is configured to automatically mount LDAP user home directories from an NFS share by editing the /etc/auto.master and /etc/auto.ldapuser files and restarting the autofs service. Finally, login as an LDAP user is tested to verify their home directory is automatically mounted.

Uploaded by

ingenieur cloud
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
118 views

LDAP Client Configuration With Autofs Home Directories

This document provides instructions for configuring an LDAP client with autofs home directory mounts on CentOS. It describes installing required packages like openldap-clients, nss-pam-ldapd and sssd. The LDAP server details can then be configured using either the GUI tool system-config-authentication or the CLI tool authconfig-tui. Autofs is configured to automatically mount LDAP user home directories from an NFS share by editing the /etc/auto.master and /etc/auto.ldapuser files and restarting the autofs service. Finally, login as an LDAP user is tested to verify their home directory is automatically mounted.

Uploaded by

ingenieur cloud
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Fwd: LDAP CLIENT

1 message

aicha salmani <[email protected]> dim. 15 déc. 2019 à 18:50


À : [email protected]

---------- Forwarded message ---------


De : hafedh <[email protected]>
Date: dim. 15 déc. 2019 à 18:50
Subject: LDAP CLIENT
To: <[email protected]>

LDAP client configuration with autofs home directories


 
LDAP client. Autofs is an excellent feature/service to mount to remote NFS shares automatically without
running mount command, even from normal users who do not require to have mount command
permissions.

LDAP Client configuration


first,
install required packages, in this article we will see how to configure LDAP client using CLI interface and
GUI Interface

[root@ldapclient1 ~]# yum install -y openldap-clients nss-pam-ldapd sssd authconfig-gtk


[root@ldapclient1 ~]# yum install nfs-utils rpcbind autofs

Using GUI mode


install above packages then enter the command “system-config-authentication“

Using CLI mode


type command “authconfig-tui“

Select [*] Use LDAP

select [*] Use LDAP Authentication

click Next

provide the ldap server details as shown above and click ok

verify the ldap user information using below command

[root@ldapclient1 ~]# getent passwd ldapuser1


ldapuser1:*:1001:1001:ldapuser1:/home/ldapuser1:/bin/bash

as you see below there is no home directory for ldapuser1

[root@ldapclient1 ~]# su - ldapuser1


su: warning: cannot change directory to /home/ldapuser1: No such file or directory
-bash-4.2$

Now mount user home directory using autofs

edit autofs master configuration file add entry

[root@ldapclient1 ~]# vim /etc/auto.master


#
# Sample auto.master file
# This is a 'master' automounter map and it has the following format:
# mount-point [map-type[,format]:]map [options]
# For details of the format look at auto.master(5).
#
/misc /etc/auto.misc
/home /etc/auto.ldapuser

now create /etc/auto.ldapuser file and add the entry for autofs mount

[root@ldapclient1 ~]# cat /etc/auto.ldapuser


* -rw 192.168.4.15:/home/&

Now restart autofs service

[root@ldapclient1 ~]# systemctl restart autofs


[root@ldapclient1 ~]# systemctl enable autofs
ln -s '/usr/lib/systemd/system/autofs.service' '/etc/systemd/system/multi-user.target.wants/autofs.service'
login using ldapuser then verify you should get ldapuser home directory automatically

[root@ldapclient1 ~]# su - ldapuser1


Last login: Sun Mar 20 00:02:00 IST 2016 on pts/0
[ldapuser1@ldapclient1 ~]$

You might also like