4 DESCRIPTION="Adding live session user..."
21 log_begin_msg "$DESCRIPTION"
23 # U6aMy0wojraho is just a blank password
24 chroot /root debconf-communicate -fnoninteractive casper > /dev/null <<EOF
25 set passwd/root-password-crypted *
26 set passwd/user-password-crypted UMxWpqk1F1hww
27 set passwd/user-fullname $USERFULLNAME
28 set passwd/username $USERNAME
29 set passwd/user-uid 999
32 chroot /root /usr/bin/env -i HOME="/root" \
33 TERM="${TERM}" PATH="/usr/sbin:/usr/bin:/sbin:/bin" \
34 /usr/lib/user-setup/user-setup-apply > /dev/null
36 # Clear out debconf database again to avoid confusing ubiquity later.
37 chroot /root debconf-communicate -fnoninteractive casper > /dev/null <<EOF
38 set passwd/root-password-crypted
39 set passwd/user-password-crypted
40 set passwd/user-fullname
45 if [ -f /root/etc/sudoers ]; then
46 if [ -x /sbin/udevplug ]; then
47 # FIXME: ugly hack, admin is not present in debian so we do here ubuntu stuff
48 # XXX - awful hack to stop xscreensaver locking the screen (#7150)
49 echo 'RUNNING_UNDER_GDM="yes"' >> /root/etc/environment
50 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
51 for file in /usr/share/applications/ubiquity-gtkui.desktop /usr/share/applications/kde/ubiquity-kdeui.desktop; do
52 if [ -f "/root/$file" ]; then
53 chroot /root install -D -o $USERNAME -g $USERNAME $file /home/$USERNAME/Desktop/$(basename "$file")
57 else # We are in debian :-)
58 echo "${USERNAME} ALL=(ALL) NOPASSWD: ALL" >> /root/etc/sudoers
62 if [ -L /root/home/$USERNAME/Examples ]; then
63 chroot /root install -o $USERNAME -g $USERNAME -d /home/$USERNAME/Desktop/
64 mv /root/home/$USERNAME/Examples /root/home/$USERNAME/Desktop/