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
STEPS TOOK:
make directory for ldap users mounts
mkdir /ldap
enable LDAP with authconfig-tui
authconfig-tui
install autofs
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
auto.misc (untouched)
cd -fstype=iso9660,ro,nosuidmnodev :dev/cdrom
update auto.map file (created by me)
/ldap -fstype=nfs server:/home/&
restart autofs
systemctl restart autofs
login with ldap user
su - ldapuser
Additional Info
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
ldapuser:*:200044:200044:LDAPUSER 1:/home/ldapuser:/bin/bash
auto.master
andauto.misc
please. And have you editedauto.map
at all, or is that standard?/home
, but you're mounting users' directories under/ldap
. Is there a piece of the puzzle you've not shared with us, or is this part of the problem?getent passwd ldapuser1
to your question.