In fact, I can reproduce the problem only using yum: $ yum --installroot /tmp/chronytest install chrony
The resulting /tmp/chronytest/var/lib/chrony has the uid/gid of the chrony user of /etc/passwd, not /tmp/chronytest/etc/passwd. Jean-Baptiste On 7/14/20 12:41 PM, Jean-Baptiste Denis wrote: > Hello, > > I've got a problem regarding some uid inside a stateless image. > > I've got my xcat server with chrony installed: > > $ grep chrony /etc/passwd > chrony:x:995:992::/var/lib/chrony:/sbin/nologin > > The chrony user has uid 995 and gid 992 on the xcat server. > > Inside the stateless image, just after the genimage (chrony is installed > using a pkglist), the chrony user has uid 994 > and gid 990: > > $ grep chrony > /install/image/netboot/cpu/netboot-cpu-centos8.1/img/rootimg/etc/passwd > chrony:x:994:990::/var/lib/chrony:/sbin/nologin > > The problem is that the chrony package installation is creating a > /var/lib/chrony directory in the rootimg directory > using the chrony user from the xcat host and not the one from the image: > > $ ls -nd > /install/image/netboot/cpu/netboot-cpu-centos8.1/img/rootimg/var/lib/chrony/ > drwxr-xr-x 2 995 992 6 Nov 19 2019 > /install/image/netboot/cpu/netboot-cpu-centos8.1/img/rootimg/var/lib/chrony/ > > It should be 994:990. > > This is problematic, because when I boot on the image, the /var/lib/chrony > directory owner is 'sssd' and group is > 'systemd-coredump'. I've only spotted this specific problem, but it could > potentially concerns other users/groups. I'd > rather not just 'fixing' the owner/group of this directory. One solution > could be to remove all packages that create > users from the pkglist and install them after directory in the chroot. > > It seems to me quite difficult to synchronize *system* user/group on the xcat > server and within the images. It basically > depends on the package order installation. > > So I was wondering if I was doing something wrong here ? Maybe I missed > something. > > Thank you, > > Jean-Baptiste > > > _______________________________________________ > xCAT-user mailing list > xCAT-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/xcat-user > _______________________________________________ xCAT-user mailing list xCAT-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xcat-user