From 0834cb4ae23b09a02e889bf8babbcbe6d577d74b Mon Sep 17 00:00:00 2001 From: Arya Kiran Date: Mon, 23 Jan 2023 14:42:50 +0530 Subject: [PATCH] more signup script fixing --- utils/signup-script-template | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/utils/signup-script-template b/utils/signup-script-template index 4c8a60e..ebe775c 100644 --- a/utils/signup-script-template +++ b/utils/signup-script-template @@ -8,17 +8,18 @@ chmod 711 /home/{{username}} printf "%s\n%s" "${pass}" "${pass}" | passwd {{username}} echo "${pass}" > /home/{{username}}/pass chmod 600 /home/{{username}}/pass -chown {{username}}:username /home/username/pass +chown {{username}}:{{username}} /home/{{username}}/pass usermod -aG users {{username}} mkdir /home/{{username}}/.ssh echo "{{sshkey}}" > /home/{{username}}/.ssh/authorized_keys chmod 700 /home/{{username}}/.ssh chmod 600 /home/{{username}}/.ssh/authorized_keys -chown -R {{username}}:username /home/username/.ssh -sed -i 's/REPLACEME/{{username}}/g' /home/username/{meta-info.env,Caddyfile} +chown -R {{username}}:{{username}} /home/{{username}}/.ssh +sed -i 's/REPLACEME/{{username}}/g' /home/{{username}}/{meta-info.env,Caddyfile} sed -i 's/EMAIL=/EMAIL={{email}}/' /home/{{username}}/meta-info.env loginctl enable-linger {{username}} setquota -u {{username}} 20G 20G 0 0 / a=$(curl -X POST "https://auth.p.projectsegfau.lt/api/v3/core/users/" -H "accept: application/json" -H "content-type: application/json" -H "Authorization: Bearer $(