fix bugs in makeuser
This commit is contained in:
parent
ba4f9cb87e
commit
96c1c11108
BIN
.makeuser.swp
BIN
.makeuser.swp
Binary file not shown.
|
@ -2,6 +2,11 @@
|
|||
pw=$(pwgen -1B 10)
|
||||
pwcrypt=$(perl -e "print crypt('${pw}', 'sa');")
|
||||
useradd -m -g 100 -p ${pwcrypt} -s /bin/bash $1 || exit 1
|
||||
mkdir /home/$1/.ssh
|
||||
touch /home/$1/.ssh/authorized_keys
|
||||
chown -R $1:tilde /home/$1
|
||||
chmod 700 /home/$1/.ssh
|
||||
chmod 600 /home/$1/.ssh/authorized_keys
|
||||
echo "$3" | tee /home/$1/.ssh/authorized_keys
|
||||
|
||||
sed -e "s/USERNAME/$1/g" -e "s/PASSWORD/${pw}" /var/aussie/emails/email.tmpl | sendmail $1@aussies.space $2 fosslinux@aussies.space
|
||||
sed -e "s/USERNAME/$1/g" -e "s/PASSWORD/${pw}/g" /var/aussie/emails/signup.tmpl | sendmail $1@aussies.space $2 fosslinux@aussies.space
|
||||
|
|
Loading…
Reference in New Issue