I'm trying to set an nfs automount with ldap in a folder other than /home.
It turns out that autofs always mounts in /home, no matter what.
I tried many configurations from the web, including from redhats but they all failed to mount the nfs export in /ldap directory.
despite /ldap folder is created it is not accessible even by root user.
Am I missing something? Should Server-side allow something specific? or is this a bug?
Linux distro: CentOS 7.0
make directory for ldap users mounts
enable LDAP with authconfig-tui
yum -y install autofs
allow home directory creation
authconfig --enablemkhomedir --updateall
update auto.master file (direct mapping)
/misc /etc/auto.misc /- /etc/auto.map #Inserted Line /net -hosts +dir:/etc/auto.master.d +auto.master
cd -fstype=iso9660,ro,nosuidmnodev :dev/cdrom
update auto.map file (created by me)
/ldap -fstype=nfs server:/home/&
systemctl restart autofs
login with ldap user
su - ldapuser
on 4) I've tried both with --disablemkhomedir and with --enablemkhomedir. When using disablemkhomedir I get an error that was not possible to change to home/user directory. Even though I configured /ldap. What would make sense to me would be /ldap/ldaupuser1.
su: warning: cannot change directory to /home/ldapuser1: No such file or directory
on 7) the /ldap folder is created but I can't access the folder, even with root user. it displays:
cd /ldap -bash:cd: /ldap: No such file or directory
getent passwd ldapuser