Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/etc/passwd userid issue #15

Closed
JvD007 opened this issue Jul 13, 2020 · 11 comments
Closed

/etc/passwd userid issue #15

JvD007 opened this issue Jul 13, 2020 · 11 comments

Comments

@JvD007
Copy link

JvD007 commented Jul 13, 2020

Gentoo user prompt is wrong, Name is not from the local /etc/passwd.

dell@Innopad-01:~$ /cvmfs/pilot.eessi-hpc.org/test/gentoo/2020/startprefix
Entering Gentoo Prefix /cvmfs/pilot.eessi-hpc.org/test/gentoo/2020

henkjan@Innopad-01:~$
User is coming from /cvmfs/pilot.eessi-hpc.org/test/gentoo/2020/etc/passwd.

I have no name!@Innopad-01:/mnt/c/Users/Innopad$

User is not in the /etc/passwd file coming from /cvmfs/pilot.eessi-hpc.org/test/gentoo/2020/etc/passwd.

Can we use the local /etc/passwd file?

@boegel
Copy link
Contributor

boegel commented Sep 18, 2020

I used this (dirty) hack when installing stuff in the pilot repo:

getent passwd $(id -u) >> /cvmfs/pilot.eessi-hpc.org/2020.08/compat/x86_64/etc/passwd

Of course that only works if you have write access to /cvmfs (for example via a writable overlay created with fuse-overlayfs).

Perhaps symlinking to the system /etc/passwd is a good idea, but I don't think that will be enough (no all user accounts are listed in /etc/passwd).

@bedroge
Copy link
Collaborator

bedroge commented Sep 21, 2020

Bart Oldeman suggested to make the following symlinks to resolve this (and other) issue(s):

etc/group -> /etc/group
etc/hosts -> /etc/hosts
etc/nsswitch.conf -> /etc/nsswitch.conf
etc/passwd -> /etc/passwd
etc/resolv.conf -> /etc/resolv.conf
var/lib/munge -> /var/lib/munge
var/lib/unbound -> /var/lib/unbound
var/lib/VirtualGL -> /var/lib/VirtualGL
var/log/munge -> /var/log/munge
var/log/wtmp -> /var/log/wtmp
var/run -> /var/run
var/spool -> /var/spool
var/tmp -> /var/tmp
lib64/libnss_centrifydc.so.2 -> /lib64/libnss_centrifydc.so.2
lib64/libnss_ldap.so.2 -> /lib64/libnss_ldap.so.2
lib64/libnss_sss.so.2 -> /lib64/libnss_sss.so.2
run/dbus -> /run/dbus
tmp -> /tmp

@boegel
Copy link
Contributor

boegel commented Sep 21, 2020

@bartoldeman Is there any documentation available on why each of these should be symlinked?

The only one I know why really is /etc/passwd (to make sure the local user accounts are known)...

@bartoldeman
Copy link

Many of these (the ones involving /var) I consider bugs in the gentoo prefix recipes, though it depends a bit on the use case.
So some packages could be compiled with --localstatedir=/var instead of --localstatedir=${EPREFIX}/var passed to configure to avoid some of the links.

Similarly for sysconfdir (/etc) but it depends a lot, some things in /etc are static (so can be in cvmfs), some are system dependent, etc.

Files like /var/log/wtmp and /var/run/utmp are written to by the system but read by utilities in the compatibility layer such as w, last and who. It's all been a bit of trial and error, and a bit of strace.

@bedroge
Copy link
Collaborator

bedroge commented Sep 24, 2020

This should be solved by #37 and #38 and. You can try it in the 2020.09 version of our pilot (/cvmfs/pilot.eessi-hpc.org/2020.09/compat/x86_64).

@bedroge
Copy link
Collaborator

bedroge commented Sep 24, 2020

@JvD007 Could you test if this also solves the issue for you?

@JvD007
Copy link
Author

JvD007 commented Sep 24, 2020

How! like source /cvmfs/pilot.eessi-hpc.org/2020.09/init/bash or......

@bedroge
Copy link
Collaborator

bedroge commented Sep 25, 2020

That doesn't work yet, but there is a startprefix that should allow you to test it:
/cvmfs/pilot.eessi-hpc.org/2020.09/compat/x86_64/startprefix

@JvD007
Copy link
Author

JvD007 commented Sep 25, 2020

Works
image

@boegel
Copy link
Contributor

boegel commented Sep 25, 2020

@bedroge OK to close this then?

@bedroge
Copy link
Collaborator

bedroge commented Sep 25, 2020

Yes, think so, though we may still need some more symlinks later on.

@bedroge bedroge closed this as completed Sep 25, 2020
poksumdo pushed a commit to poksumdo/compatibility-layer that referenced this issue Jun 8, 2023
Add YAML lint action for eessi_sets.yml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants