livecd-rootfs/live-build/ubuntu-core/hooks/01-setup_user.chroot
Michael Vogt 5f9521d65f do not create "ubuntu" user for ubuntu-core anymore, the
console-conf package will create this user now
2016-09-02 17:04:23 +02:00

25 lines
587 B
Bash
Executable File

#!/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