[SOLVED] NFS + autofs /home mount stubbornly mounting as "nobody"
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
NFS + autofs /home mount stubbornly mounting as "nobody"
Two machines (currently VMs for testing purposes) with Ubuntu 10.10, one server, one desktop (in production it will be 4+ desktops)
Both configured to use LDAP for user authentication.
Desktop is running autofs, it is NOT configured to get its mount data from LDAP until I verify everything works without it. auto.home file contains
Test user's homedir copied to the server and put in exports file with rw,sync,no_root_squash,no_subtree_check
Basic idmapd.conf file set up and enabled in all nfs-common and nfs-kernel-server conf files. Nothing was changed from the defaults except filling in the Domain field.
The directory mounts correctly except that it's mounting as nobody and nogroup, and I need it to mount as the user who mounts it. I'm sure I must be one command switch away from having this right but I can't find it.
If you are using the default file-based authentication methods, you'll probably never see it. If you've implemented a single sign on or other such system such as LDAP (in my case) or NIS, configuring this file is part of enabling the alternate login modules on the client system - in the case of Debian-based systems they are configured when you install the nss-related packages. There are no changes you actually make to nsswitch.conf itself that have anything to do with NFS.
The issue here is that NFS expects default authentication methods, getting its data out of /etc/passwd, /etc/group and so on. When you're using ldap authentication, your user accounts don't exist in these files. Adding the above lines to idmapd.conf tells idmapd to look at nsswitch.conf to find the correct place to get the user's id data from.
Thanks for your references.
But what are "system authentication packages" and "nss-related packages" ?
I don't use LDAP. I have a "/etc/nsswitch.conf" and its content is :
hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4
protocols: db files
services: db files
ethers: db files
rpc: db files
I get "users" as the owner group, but still "nobody" as the owner user.
Thanks for the link, I know this howto, but my config is slightly different.
On both server and client the main user id is 1000 belonging to the group id 100.
On the server (192.168.1.2):
UUID=... /mnt/Backup ext4 defaults,errors=remount-ro,relatime,async,_netdev 0 2
Domain = <server_hostname>
On the client (192.168.1.3):
/net /etc/auto.nfs --ghost,--timeout=30
Backup -fstype=nfs4,rw,intr,async 192.168.1.2:/mnt/Backup/subfolder
Domain = <server_hostname>
The problem is that even if I put 770 or 777 rights on /mnt/Backup/subfolder the following command fails in creating files in subfolders:
cp -alR "/net/Backup/folder1/"* "/net/Backup/folder2"
To be more accurate, /net/Backup/folder2 have 777 rights, all subfolders are created but have 555 rights, none of included files are created and one error message "operation not permitted" per each file copy attempt is displayed.
I don't know any parameter in /etc/default/nfs-kernel-server that is related to "idmapd".
On both server and client the following line is in /etc/default/nfs-common:
On both server and client, the following command returns that rpc.idmapd is running:
ps aux | grep idmapd
Please push the limits of your knowledge to suggest anything else to me...