17 lines
451 B
Bash
17 lines
451 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
if id -u "aether" >/dev/null 2>&1; then
|
||
|
echo User exists
|
||
|
else
|
||
|
echo User does not exist.
|
||
|
useradd -m -s $(grep bash /etc/shells) aether
|
||
|
mkdir -p /home/aether/.ssh
|
||
|
cp ./aether /home/aether/.ssh/
|
||
|
cp ./aether.bash /home/aether
|
||
|
chmod u+x /home/aether/aether.bash
|
||
|
chown -R aether /home/aether
|
||
|
chmod -R go-rwx /home/aether
|
||
|
echo '0 0 * * * /bin/bash /home/aether/aether.bash' | crontab
|
||
|
passwd aether
|
||
|
fi
|