add users to `users` group

This commit is contained in:
Arya 2023-01-21 22:29:54 +05:30
parent 804fc1c5e4
commit b6c0ac8e6b
Signed by: arya
GPG Key ID: 842D12BDA50DF120
1 changed files with 1 additions and 0 deletions

View File

@ -5,6 +5,7 @@ echo "E-Mail of {{username}} is {{email}}."
useradd -Um -s /bin/bash {{username}}
chmod 711 /home/{{username}}
printf "%s\n%s" "${pass}" "${pass}" | passwd {{username}}
usermod -aG users {{username}}
mkdir /home/{{username}}/.ssh
echo "{{sshkey}}" > /home/{{username}}/.ssh/authorized_keys
chmod 700 /home/{{username}}/.ssh