diff --git a/live-installer/installer.py b/live-installer/installer.py index c553abe3187aaaa7ededae541bc25b230e90444f..1f5e3760d2a4a9e24667a80362fd103844319600 100644 --- a/live-installer/installer.py +++ b/live-installer/installer.py @@ -117,28 +117,10 @@ class InstallerEngine: our_current += 1 self.update_progress(our_current, our_total, False, False, ("Adding new user to the system")) - if self.setup.ecryptfs: - # ecryptfs looks for the /sys mount point in /etc/mtab.. which doesn't exist during the installation. - # it defaults to /sys anyway, so we just need to create an empty /etc/mtab file at this stage. - self.do_run_in_chroot('touch /etc/mtab') - self.do_run_in_chroot('modprobe ecryptfs') - self.do_run_in_chroot('adduser --disabled-login --encrypt-home --gecos "{real_name}" {username}'.format( - real_name=self.setup.real_name.replace('"', r'\"'), username=self.setup.username)) - else: - self.do_run_in_chroot('adduser --disabled-login --gecos "{real_name}" {username}'.format( - real_name=self.setup.real_name.replace('"', r'\"'), username=self.setup.username)) - for group in 'adm audio bluetooth cdrom dialout dip fax floppy fuse lpadmin netdev plugdev powerdev sambashare scanner sudo tape users vboxusers video'.split(): - self.do_run_in_chroot("adduser {user} {group}".format( - user=self.setup.username, group=group)) - - fp = open("/target/tmp/.passwd", "w") - fp.write(self.setup.username + ":" + self.setup.password1 + "\n") - fp.close() - self.do_run_in_chroot("cat /tmp/.passwd | chpasswd") - os.system("rm -f /target/tmp/.passwd") - - # Lock and delete root password - self.do_run_in_chroot("passwd -dl root") + #TODO: support encryption + self.do_run_in_chroot('useradd {username}'.format(username=self.setup.username)) + self.do_run_in_chroot("echo -ne\"{0}\\n{1}\\n\" | passwd {2}".format(self.setup.password1,self.setup.password1,self.setup.username)) + self.do_run_in_chroot("echo -ne\"{0}\\n{1}\\n\" | passwd".format(self.setup.password1,self.setup.password1)) # Set LightDM to show user list by default self.do_run_in_chroot(