diff --git a/server/modules/local-accounts-ecrypt/opt/ecryptfs/makesigphrase.sh b/server/modules/local-accounts-ecrypt/opt/ecryptfs/makesigphrase.sh index 82a54b9b9d84096d79a135758db0f6081ba70d4f..f9a670eecb287a653296fa5e01fd26ed48a81821 100755 --- a/server/modules/local-accounts-ecrypt/opt/ecryptfs/makesigphrase.sh +++ b/server/modules/local-accounts-ecrypt/opt/ecryptfs/makesigphrase.sh @@ -2,6 +2,7 @@ username=$1 password=$2 path=$3 +device=$4 user_home="$path/$username" ecryptfs_path="$path/.ecryptfs" @@ -37,4 +38,10 @@ chmod 600 "$user_ecrypt_path/.ecryptfs/wrapped-passphrase" chmod 644 "$user_ecrypt_path/.ecryptfs/auto-mount" chmod 644 "$user_ecrypt_path/.ecryptfs/auto-umount" +if [ $device == "hd" ]; then + chown -R $username:$username $user_ecrypt_path + ln -s "$user_ecrypt_path/.ecryptfs/" "/home/$username/" + ln -s "$user_ecrypt_path/.Private/" "/home/$username/" + ln -s "/opt/ecryptfs/README.txt" "/home/$username/README.txt" +fi keyctl clear @u