4 DESCRIPTION="Adding live session user..."
6 . /scripts/live-functions
21 log_begin_msg "$DESCRIPTION"
23 # U6aMy0wojraho is just a blank password
24 chroot /root debconf-communicate -fnoninteractive live-initramfs > /dev/null <<EOF
25 set passwd/root-password-crypted *
26 set passwd/user-password-crypted U6aMy0wojraho
27 set passwd/user-fullname $USERFULLNAME
28 set passwd/username $USERNAME
29 set passwd/user-uid 999
32 chroot /root /usr/lib/user-setup/user-setup-apply > /dev/null
34 # Clear out debconf database again to avoid confusing ubiquity later.
35 chroot /root debconf-communicate -fnoninteractive live-initramfs > /dev/null <<EOF
36 set passwd/root-password-crypted
37 set passwd/user-password-crypted
38 set passwd/user-fullname
43 if [ -f /root/etc/sudoers ]; then
44 if [ "${BUILD_SYSTEM}" = "Ubuntu" ]; then
45 grep -q '^%admin' /root/etc/sudoers && sed -i -e '/^%admin/s/ALL$/NOPASSWD: ALL/' /root/etc/sudoers || echo '%admin ALL=(ALL) NOPASSWD: ALL' >> /root/etc/sudoers
46 elif [ "${BUILD_SYSTEM}" = "Debian" ]; then
47 echo "${USERNAME} ALL=(ALL) NOPASSWD: ALL" >> /root/etc/sudoers
51 # XXX - awful hack to stop xscreensaver locking the screen (#7150)
52 echo 'RUNNING_UNDER_GDM="yes"' >> /root/etc/environment
54 for file in /usr/share/applications/ubiquity-gtkui.desktop /usr/share/applications/kde/ubiquity-kdeui.desktop; do
55 if [ -f "/root/$file" ]; then
56 chroot /root install -D -o $USERNAME -g $USERNAME $file /home/$USERNAME/Desktop/$(basename "$file")
61 if [ -L /root/home/$USERNAME/Examples ]; then
62 chroot /root install -o $USERNAME -g $USERNAME -d /home/$USERNAME/Desktop/
63 mv /root/home/$USERNAME/Examples /root/home/$USERNAME/Desktop/