2014-07-31 10:37:18 +01:00
|
|
|
#!/bin/sh -x
|
|
|
|
|
2015-01-28 11:03:08 -05:00
|
|
|
set -e
|
|
|
|
|
2016-09-09 15:57:27 -07:00
|
|
|
# There is no default user anymore, console-conf is responsible
|
|
|
|
# for creating one
|
2014-07-31 10:37:18 +01:00
|
|
|
|
2016-09-09 15:57:27 -07: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:36:34 +01:00
|
|
|
done
|
2014-07-31 10:37:18 +01:00
|
|
|
|
2016-09-09 15:57:27 -07:00
|
|
|
for name in gshadow shadow; do
|
|
|
|
chmod 640 /var/lib/extrausers/$name
|
|
|
|
chown root:shadow /var/lib/extrausers/$name
|
|
|
|
done
|
2015-01-14 22:49:43 -08: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-09 15:57:27 -07:00
|
|
|
|
2015-01-28 11:03:08 -05:00
|
|
|
|