* live-build/ubuntu-core/hooks/01-setup_user.chroot:

- run chpasswd after user moved into /var/lib/extrausers
ubuntu/yakkety
Michael Vogt 10 years ago
parent e226eb6331
commit f786a86cb2

7
debian/changelog vendored

@ -1,3 +1,10 @@
livecd-rootfs (2.275+ppa4) vivid; urgency=low
* live-build/ubuntu-core/hooks/01-setup_user.chroot:
- run chpasswd after user moved into /var/lib/extrausers
-- Michael Vogt <michael.vogt@ubuntu.com> Fri, 16 Jan 2015 19:56:49 +0100
livecd-rootfs (2.275+ppa3) vivid; urgency=low livecd-rootfs (2.275+ppa3) vivid; urgency=low
* live-build/ubuntu-core/hooks/01-setup_user.chroot: * live-build/ubuntu-core/hooks/01-setup_user.chroot:

@ -6,14 +6,10 @@ USER=ubuntu
UGID=1000 UGID=1000
echo "I: creating default user $USER" echo "I: creating default user $USER"
adduser --gecos $USER --disabled-password $USER --uid $UGID adduser --gecos $USER --disabled-login $USER --uid $UGID
chown -R $UGID:$UGID /home/$USER chown -R $UGID:$UGID /home/$USER
passwd -d $USER
echo "I: set user $USER password to $USER"
echo "$USER:$USER" | chpasswd
# 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
@ -34,3 +30,8 @@ sed -i "/^$USER/d" /etc/group
sed -i "/^$USER/d" /etc/passwd sed -i "/^$USER/d" /etc/passwd
sed -i "/^$USER/d" /etc/shadow sed -i "/^$USER/d" /etc/shadow
sed -i "/^$USER/d" /etc/gshadow sed -i "/^$USER/d" /etc/gshadow
# needs to run *after* the user was moved out to /var/lib/extrausers
echo "I: set user $USER password to $USER"
echo "$USER:$USER" | chpasswd

Loading…
Cancel
Save