Jason Welsh
2015-Sep-09 20:31 UTC
[CentOS] automounter with users home directories on centos 7.
Has anyone gotten this to work? Im studing for my rhce and was trying to get this to work and its just not working like it shows in the book im going by. So basically I have two centos 7 servers running under kvm.. One is the nfs server, one is the nfs client.. I have been mounting up other NFS shares on the client and they work fine.. The automounter also seems to mount direct mounts fine as well.. But when I try to do home directories, it just doesnt work.. on my server (named server1), Im exporting /home as /home server2(rw,sync,no_root_squash) on my client, ive got [root at server2 ~]# grep home /etc/auto.master /home /etc/auto.home --timeout=120 and [root at server2 ~]# cat /etc/auto.home * -rw,soft,intr server1:/home/& [root at server2 ~]# and on server1, ive got the selinux enabled, but have the following booleans set. [root at server1 ~]# getsebool -a | grep nfs_ nfs_export_all_ro --> on nfs_export_all_rw --> on use_nfs_home_dirs --> on [root at server1 ~]# so when I try to switch to my user on server2 (client), I get [root at server2 ~]# su - user1 Last login: Wed Sep 9 16:25:27 EDT 2015 on pts/0 su: warning: cannot change directory to /home/user1: No such file or directory -bash-4.2$ and theres nothing in the logs that I can find as to why the automount isnt working.. [root at server2 ~]# showmount -e server1 Export list for server1: /home server2 I generated a log (on both server) with sealert, but it shows found 0 alerts in /var/log/audit/audit.log any ideas? -- Jason
Pete Geenhuizen
2015-Sep-09 20:51 UTC
[CentOS] automounter with users home directories on centos 7.
Not tried automount with Centos 7 nor with selinux. With that said autofs relies on nfs mounting to work, so have you started there by attempting to manually mount /home? Another place to look is at the hostname. I've had problems where auto mount doesn't like the short name and insists on using a FQDN, to get around that you could try using the IP address rather than the hostname. On 09/09/15 16:31, Jason Welsh wrote:> showmount -e-- If money can fix it, it's not a problem. -- Click and Clack the Tappet brothers
James A. Peltier
2015-Sep-09 21:35 UTC
[CentOS] automounter with users home directories on centos 7.
----- Original Message ----- | Not tried automount with Centos 7 nor with selinux. | | With that said autofs relies on nfs mounting to work, so have you | started there by attempting to manually mount /home? | | Another place to look is at the hostname. I've had problems where auto | mount doesn't like the short name and insists on using a FQDN, to get | around that you could try using the IP address rather than the hostname. | | On 09/09/15 16:31, Jason Welsh wrote: | > showmount -e | | -- | If money can fix it, it's not a problem. | -- Click and Clack the Tappet brothers /home is a directory by default on all GNU/Linux hosts. If you plan to use it as a mount point then you need to remove the directory and then start autofs otherwise there will be a conflict. -- James A. Peltier IT Services - Research Computing Group Simon Fraser University - Burnaby Campus Phone : 604-365-6432 Fax : 778-782-3045 E-Mail : jpeltier at sfu.ca Website : http://www.sfu.ca/itservices Twitter : @sfu_rcg Powering Engagement Through Technology