Manually create /home/admin with cp and chown instead of relying on mkhomedir_helper, to cover running the procedure in a chroot

This commit is contained in:
Alexandre Aubin 2021-05-24 16:05:45 +02:00
parent 170156ac22
commit 74054f721a

View file

@ -59,7 +59,14 @@ EOF
systemctl restart slapd
mkhomedir_helper admin
# We don't use mkhomedir_helper because 'admin' may not be recognized
# when this script is ran in a chroot (e.g. ISO install)
# We also refer to admin as uid 1007 for the same reason
if [ ! -d /home/admin ]
then
cp -r /etc/skel /home/admin
chown -R 1007:1007 /home/admin
fi
}
_regenerate_slapd_conf() {