Kaydet (Commit) 369a1cc0 authored tarafından sulincix's avatar sulincix

fixes 4

üst 6ec94d4c
...@@ -117,28 +117,10 @@ class InstallerEngine: ...@@ -117,28 +117,10 @@ class InstallerEngine:
our_current += 1 our_current += 1
self.update_progress(our_current, our_total, False, self.update_progress(our_current, our_total, False,
False, ("Adding new user to the system")) False, ("Adding new user to the system"))
if self.setup.ecryptfs: #TODO: support encryption
# ecryptfs looks for the /sys mount point in /etc/mtab.. which doesn't exist during the installation. self.do_run_in_chroot('useradd {username}'.format(username=self.setup.username))
# it defaults to /sys anyway, so we just need to create an empty /etc/mtab file at this stage. 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('touch /etc/mtab') self.do_run_in_chroot("echo -ne\"{0}\\n{1}\\n\" | passwd".format(self.setup.password1,self.setup.password1))
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))
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")
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")
# Set LightDM to show user list by default # Set LightDM to show user list by default
self.do_run_in_chroot( self.do_run_in_chroot(
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment