On 1/30/22 1:34 AM, Ed Greshko wrote:
On 30/01/2022 12:36, Robert Nichols wrote:
On 1/29/22 8:25 PM, Gordon Messmer wrote:
On 1/29/22 17:20, Ed Greshko wrote:
In the initial posting by Robert he wrote:
"I have no nfs-idmapd service running"
Right, but on recent kernels, the client doesn't use rpc.idmapd, it uses "nfsidmap". The fact that rpc.idmapd isn't running doesn't really tell us anything.
"all users and groups in an NFS mounted filesystem are mapped to "nobody" even though the names and
numeric IDs are the same on the server and client"
So, I don't know why we're going down this path.
Jan 28 21:19:14 fedora.local nfsidmap[2461]: nss_getpwnam: name 'root@local' does not map into domain 'localdomain'
Right, that log entry indicates that idmap is being used on his system. That might mean that the server doesn't support NFSv4 without idmap. Or it might mean the client was configured to enable idmapping.
Without knowing which, we don't really know the right thing to do, except to set the client's domain to match the servers, so that idmapping works as expected.
If I could find any way to set the client's domain name, I would. Nothing I try has any effect on the domain name.
When I try to set a FQDN with hostnamectl, then "hostnamectl" (with no arguments) shows that FQDN as the static hostname, but "hostname --fqdn" responds with "hostname: Name or service not known", and "mount -t nfs ..." causes the various "... does not map into domain 'localdomain'" messages to be logged.
I think you need to be a bit more specific in your replies.
Are the client and the server both Fedora systems, or at least Linux? Mine are now. I was using a NAS but I don't have full
root privileges.
In both cases the "Domain" line /etc/idmapd.conf are commented out. The line starts with "#".
So on the server.....
[root@f35ser ~]# hostnamectl
Static hostname: f35ser.greshko.com
Icon name: computer-vm
Chassis: vm
Machine ID: c4783bc505a24a9f973009568932bd82
Boot ID: e49e999bf75949b6a27dba21bc96c15e
Virtualization: kvm
Operating System: Fedora Linux 35 (Server Edition)
CPE OS Name: cpe:/o:fedoraproject:fedora:35
Kernel: Linux 5.15.15-200.fc35.x86_64
Architecture: x86-64
Hardware Vendor: QEMU
Hardware Model: Standard PC _Q35 + ICH9, 2009
and
[root@f35ser ~]# hostname --fqdn
f35ser.greshko.com
What is the fqdn for the host you are looking for?
________________________________________________________________________
On the client
[root@f35m ~]# hostnamectl
Static hostname: f35m.greshko.com
Icon name: computer-vm
Chassis: vm
Machine ID: c0682edcc202402dbe806170e81bf3dd
Boot ID: c962ece869f941e3becd43982ae96394
Virtualization: kvm
Operating System: Fedora Linux 35 (MATE-Compiz)
CPE OS Name: cpe:/o:fedoraproject:fedora:35
Kernel: Linux 5.15.12-200.fc35.x86_64
Architecture: x86-64
Hardware Vendor: QEMU
Hardware Model: Standard PC _Q35 + ICH9, 2009_
[root@f35m ~]# hostname --fqdn
f35m.greshko.com
__________________________________________________________________________
Oh the client
[root@f35m ~]# mount f35ser:/home /mnt
[root@f35m ~]# ll /mnt
total 0
drwx------. 1 djensen users 76 Jan 28 15:42 djensen
drwx------. 1 egreshko egreshko 240 Jan 30 12:59 egreshko
And....
[root@f35m ~]# systemctl status nfs-idmapd.service
○ nfs-idmapd.service - NFSv4 ID-name mapping service
Loaded: loaded (/usr/lib/systemd/system/nfs-idmapd.service; static)
Active: inactive (dead)
So, it never ran.
Also,
[root@f35m ~]# cat /sys/module/nfs/parameters/nfs4_disable
cat: /sys/module/nfs/parameters/nfs4_disable: No such file or directory
_____________________________________________________________________
On the server
[root@f35ser ~]# cat /sys/module/nfsd/parameters/nfs4_disable_idmapping
Y
● nfs-idmapd.service - NFSv4 ID-name mapping service
Loaded: loaded (/usr/lib/systemd/system/nfs-idmapd.service; static)
Active: active (running) since Sun 2022-01-30 13:15:20 CST; 1h 20min ago
Process: 1530 ExecStart=/usr/sbin/rpc.idmapd (code=exited, status=0/SUCCESS)
Main PID: 1535 (rpc.idmapd)
Tasks: 1 (limit: 2314)
Memory: 844.0K
CPU: 6ms
CGroup: /system.slice/nfs-idmapd.service
└─1535 /usr/sbin/rpc.idmapd
Jan 30 13:15:19 f35ser.greshko.com systemd[1]: Starting NFSv4 ID-name mapping sevice
Sio, what hostname and domainname do you want to us/
The server is a CentOS 7 Linux system.
[plugh-3g ~]# hostnamectl
Static hostname: plugh-3g.local
Icon name: computer-desktop
Chassis: desktop
Machine ID: 21619c9bea8742ac907dd22d3ebb9aef
Boot ID: 0866513c82c34909b732fc3cb8d07d54
Operating System: CentOS Linux 7 (Core)
CPE OS Name: cpe:/o:centos:centos:7
Kernel: Linux 3.10.0-1160.49.1.el7.x86_64
Architecture: x86-64
[plugh-3g ~]# hostname --fqdn
plugh-3g.local
The client is Fedora 35:
[fedora ~]# systemctl status nfs-idmapd.service
○ nfs-idmapd.service - NFSv4 ID-name mapping service
Loaded: loaded (/usr/lib/systemd/system/nfs-idmapd.service; static)
Active: inactive (dead)
[fedora ~]# mount -t nfs plugh-3g:/srv/shared /Public
[fedora ~]# ll /Public
ls: cannot open directory '/Public': Permission denied
[fedora ~]# ll -d /Public
drwxrws--x. 11 nobody nobody 4096 2022-01-30 08:48:27 /Public
As it is for you, the "Domain" line /etc/idmapd.conf is commented out on both server and client.
I don't care what the client's hostname is, "fedora" is fine, and I can set that to anything I want.
I have been unable to set the Fedora 35 client's domain name to anything besides "localdomain".
FINALLY!!
I can get it all to work by putting "fedora.local" in /etc/hostname _and_ editing /etc/hosts to have "fedora.local" as the _first_ name for 127.0.0.1 .
[fedora ~]# cat /etc/hosts
127.0.0.1 fedora.local localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
With both of those in place, "dnsdomainname" and "nfsidmap -d" both return "local", and the mapping works.
I didn't have to mess with /etc/hosts on my CentOS 7 or CentOS 8 clients. They work fine with the default:
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
Now, why on Earth did I want to run Fedora anyway? Oh that's right, there was an application I wanted to try that was only available as a flatpak on CentOS 8, and flatpaks have their own level of pain. That's all water over the dam now.
I'm out of here. Thanks to all who offered help.
--
Bob Nichols "NOSPAM" is really part of my email address.
Do NOT delete it.
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure