diff --git a/input/oobe/data/bin/login b/input/oobe/data/bin/login index 24d93e5..11e949f 100755 --- a/input/oobe/data/bin/login +++ b/input/oobe/data/bin/login @@ -86,7 +86,6 @@ ff02::2 ip6-allrouters\ print("Encrypt user? Recommended for machines that may be stolen or spying relatives. (y/n)") encrypt = mchoice(["y","n"]) ucommand = ["adduser"] - if encrypt == "y": ucommand.append("--encrypt-home") ucommand = ucommand + ["--gecos","",username] try: @@ -104,6 +103,19 @@ ff02::2 ip6-allrouters\ call(["usermod","-a","-G","sudo",username]) except: print("Warning: Couldn't add user to sudo group!") + + if encrypt == "y": + call(["modprobe","ecryptfs"]) + with opem("/etc/modules","a",encode="utf-8") as mfile: + mfile.write("ecryptfs\n") + call(["ecryptfs-migrate-home","-u",username]) + for root,dirs,files in os.walk("/home"): + for files in dirs: + ffile = os.path.join(root,file) + lfile = ffile.replace("/home/","",1) + if lfile.startswith(username + "."): + shutil.rmtree(ffile) + break break print("") diff --git a/input/oobe/modscript b/input/oobe/modscript index bc75aa0..6f08123 100755 --- a/input/oobe/modscript +++ b/input/oobe/modscript @@ -1,3 +1,3 @@ #!/usr/bin/env bash -export OPUS_PACKAGES="$OPUS_PACKAGES sudo keyboard-configuration network-manager python3 ecryptfs-utils" +export OPUS_PACKAGES="$OPUS_PACKAGES sudo keyboard-configuration network-manager python3 cloud-utils ecryptfs-utils rsync lsof" export OPUS_PACKAGES_DL="$OPUS_PACKAGES console-setup locales tzdata" \ No newline at end of file