2014-07-29 21:21:41 +01:00
|
|
|
#!/bin/sh -x
|
|
|
|
|
2015-01-16 18:29:19 +01:00
|
|
|
set -e
|
|
|
|
|
2016-09-02 17:04:23 +02:00
|
|
|
# There is no default user anymore, console-conf is responsible
|
|
|
|
# for creating one
|
2014-07-29 21:21:41 +01:00
|
|
|
|
2016-09-02 17:04:23 +02:00
|
|
|
# setup the required files for extrausers
|
|
|
|
for name in group gshadow passwd shadow subuid subgid; do
|
|
|
|
touch /var/lib/extrausers/$name
|
2015-12-08 16:38:27 +01:00
|
|
|
done
|
2015-01-16 18:29:19 +01:00
|
|
|
|
2016-09-02 17:04:23 +02:00
|
|
|
for name in gshadow shadow; do
|
|
|
|
chmod 640 /var/lib/extrausers/$name
|
|
|
|
chown root:shadow /var/lib/extrausers/$name
|
|
|
|
done
|
2014-07-29 21:21:41 +01:00
|
|
|
|
2015-01-14 18:04:34 +01:00
|
|
|
# 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
|
|
|
|
|
2016-09-02 17:04:23 +02:00
|
|
|
|
2015-01-16 19:58:11 +01:00
|
|
|
|