|
|
@ -1,16 +1,19 @@
|
|
|
|
#!/bin/sh -x
|
|
|
|
#!/bin/sh -x
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
|
|
|
|
USER=ubuntu
|
|
|
|
USER=ubuntu
|
|
|
|
UGID=1000
|
|
|
|
UGID=1000
|
|
|
|
|
|
|
|
|
|
|
|
echo "I: creating default user $USER"
|
|
|
|
echo "I: creating default user $USER"
|
|
|
|
adduser --gecos $USER --disabled-login $USER --uid $UGID
|
|
|
|
adduser --gecos $USER --disabled-password $USER --uid $UGID
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
chown -R $UGID:$UGID /home/$USER
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
passwd -d $USER
|
|
|
|
echo "I: set user $USER password to $USER"
|
|
|
|
echo "I: set user $USER password to $USER"
|
|
|
|
echo "$USER:$USER" | chpasswd
|
|
|
|
echo "$USER:$USER" | chpasswd
|
|
|
|
|
|
|
|
|
|
|
|
chown -R $UGID:$UGID /home/$USER
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Enable libnss-extrusers
|
|
|
|
# Enable libnss-extrusers
|
|
|
|
sed -i 's/^group:.*compat/\0 extrausers/' /etc/nsswitch.conf
|
|
|
|
sed -i 's/^group:.*compat/\0 extrausers/' /etc/nsswitch.conf
|
|
|
|
sed -i 's/^passwd:.*compat/\0 extrausers/' /etc/nsswitch.conf
|
|
|
|
sed -i 's/^passwd:.*compat/\0 extrausers/' /etc/nsswitch.conf
|
|
|
|