From f786a86cb2dc2563e7dddba37821a6c403fb2a4d Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 16 Jan 2015 19:58:11 +0100 Subject: [PATCH] * live-build/ubuntu-core/hooks/01-setup_user.chroot: - run chpasswd after user moved into /var/lib/extrausers --- debian/changelog | 7 +++++++ live-build/ubuntu-core/hooks/01-setup_user.chroot | 11 ++++++----- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/debian/changelog b/debian/changelog index ad589f9f..88ea5f17 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 Fri, 16 Jan 2015 19:56:49 +0100 + livecd-rootfs (2.275+ppa3) vivid; urgency=low * live-build/ubuntu-core/hooks/01-setup_user.chroot: diff --git a/live-build/ubuntu-core/hooks/01-setup_user.chroot b/live-build/ubuntu-core/hooks/01-setup_user.chroot index 558fe693..967c6a1b 100755 --- a/live-build/ubuntu-core/hooks/01-setup_user.chroot +++ b/live-build/ubuntu-core/hooks/01-setup_user.chroot @@ -6,14 +6,10 @@ USER=ubuntu UGID=1000 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 -passwd -d $USER -echo "I: set user $USER password to $USER" -echo "$USER:$USER" | chpasswd - # Enable libnss-extrusers sed -i 's/^group:.*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/shadow 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 +