Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 432572 - sys-kernel/dracut-022-r5: nfs module usernames do not match Gentoo usernames
Summary: sys-kernel/dracut-022-r5: nfs module usernames do not match Gentoo usernames
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Amadeusz Żołnowski (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-24 10:08 UTC by Dennis Schridde
Modified: 2012-09-01 07:41 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dennis Schridde 2012-08-24 10:08:35 UTC
/usr/lib/dracut/modules.d/95nfs/module-setup.sh:
    # Rather than copy the passwd file in, just set a user for rpcbind
    # We'll save the state and restart the daemon from the root anyway
    egrep '^nfsnobody:' /etc/passwd >> "$initdir/etc/passwd"
    egrep '^rpc:' /etc/passwd >> "$initdir/etc/passwd"
    egrep '^rpcuser:' /etc/passwd >> "$initdir/etc/passwd"
    #type -P nologin >/dev/null && dracut_install nologin
    egrep '^nobody:' /etc/group >> "$initdir/etc/group"
    egrep '^rpc:' /etc/group >> "$initdir/etc/group"

    # rpc user needs to be able to write to this directory to save the warmstart
    # file 
    chmod 770 "$initdir/var/lib/rpcbind"
    chown rpc.rpc "$initdir/var/lib/rpcbind"

Gentoo does not have the nfsnobody, rpc, or rpcuser users. I suspect this to be the cause for some trouble I had with rootfs on NFSv4.

Reproducible: Always
Comment 1 Amadeusz Żołnowski (RETIRED) gentoo-dev 2012-08-31 14:40:15 UTC
Could you tell what is the effect of this?  The only user used in commands is rpc in chown command which is run on directory which is probably not used anyway.
Comment 2 Dennis Schridde 2012-08-31 14:59:45 UTC
(In reply to comment #1)
> Could you tell what is the effect of this?  The only user used in commands
> is rpc in chown command which is run on directory which is probably not used
> anyway.
I am not sure what the effect is. I noticed this while debugging a problem with rootfs on NFSv4, where idmapd would complain about user nobody not existing. When looking at the code in module-setup.sh I figured there might be a relation, because it does not add user nobody to passwd.
Comment 3 Amadeusz Żołnowski (RETIRED) gentoo-dev 2012-08-31 15:08:33 UTC
(In reply to comment #2)
> [...] because it does not add user nobody to passwd.

User nobody is being added in 99base/module-setup.sh.
Comment 4 Dennis Schridde 2012-08-31 15:23:31 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > [...] because it does not add user nobody to passwd.
> 
> User nobody is being added in 99base/module-setup.sh.
I noticed that, too — later. If you don't see a reason to fix this, please feel free to close it. NFSv3 is working for me for the time being, so it might be a while until I figure out why idmapd complains the way it does.
Comment 5 Amadeusz Żołnowski (RETIRED) gentoo-dev 2012-09-01 07:41:44 UTC
OK.  Reopen if you find this to be a reason wrt nfs problems, please.  NFSv4 seems to be problematic as a rootfs anyway.