Created
May 5, 2015 02:53
-
-
Save ruckuus/a69477f3d83e97cf1553 to your computer and use it in GitHub Desktop.
Deploy User
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
MYUSER="kooluser" | |
MYGROUP="wheel" | |
useradd $MYUSER | |
usermod -G $MYGROUP $MYUSER | |
mkdir -p /home/$MYUSER/.ssh | |
cat ${MYUSER}.pub > /home/$MYUSER/.ssh/authorized_keys | |
chmod 600 /home/$MYUSER/.ssh/authorized_keys | |
chmod 700 /home/$MYUSER/.ssh | |
chown -R ${MYUSER}.${MYUSER} /home/$MYUSER/.ssh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment