3
0
mirror of https://git.launchpad.net/livecd-rootfs synced 2025-03-12 11:51:11 +00:00

25 lines
587 B
Plaintext
Raw Normal View History

#!/bin/sh -x
set -e
# There is no default user anymore, console-conf is responsible
# for creating one
# setup the required files for extrausers
for name in group gshadow passwd shadow subuid subgid; do
touch /var/lib/extrausers/$name
done
for name in gshadow shadow; do
chmod 640 /var/lib/extrausers/$name
chown root:shadow /var/lib/extrausers/$name
done
# Enable libnss-extrusers
sed -i 's/^group:.*compat/\0 extrausers/' /etc/nsswitch.conf
sed -i 's/^passwd:.*compat/\0 extrausers/' /etc/nsswitch.conf
sed -i 's/^shadow:.*compat/\0 extrausers/' /etc/nsswitch.conf