Aether/make-user.bash
dev a3ffa9dc31 Converting to Git
Old log from Bazaar was:
------------------------------------------------------------
revno: 6
committer: dev <dev@aninix.net>
branch nick: Aether
timestamp: Tue 2016-05-17 15:59:19 -0500
message:
  Fixing Crontab issue on client install
  Updating server backup scripts to be smarter for user conf.
------------------------------------------------------------
revno: 5
committer: dev <dev@aninix.net>
branch nick: Aether
timestamp: Fri 2016-05-06 14:26:00 -0500
message:
  Should be a | not a >
------------------------------------------------------------
revno: 4
committer: dev <dev@aninix.net>
branch nick: Aether
timestamp: Fri 2016-05-06 14:24:21 -0500
message:
  Updating Makefile and ignore list
------------------------------------------------------------
revno: 3
committer: dev <dev@aninix.net>
branch nick: Aether
timestamp: Thu 2016-04-21 15:38:52 -0500
message:
  Filling out README and adding key creation to Makefile
------------------------------------------------------------
revno: 2
committer: dev <dev@aninix.net>
branch nick: Aether
timestamp: Thu 2016-04-21 15:30:52 -0500
message:
  Adding ignore list
------------------------------------------------------------
revno: 1
committer: dev <dev@aninix.net>
branch nick: Aether
timestamp: Wed 2016-04-20 16:14:34 -0500
message:
  Initial branch -- NOT committing SSH keys or archive.
2016-08-04 11:15:34 -05:00

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