infra/codestorage/hg-ssh
2015-10-14
Parent:121585c71fd7
infra/codestorage/hg-ssh/create_user.sh
Use the relative DNS address. Use the relative DNS address when digging for web frontends, which now works thanks to +search on dig. This allows us to transfer between namespaces without needing to change anything. Also makes this, in general, more flexible.
1 #!/bin/bash
3 USERNAME=$1
4 IDS=$2
6 adduser --disabled-password --gecos "" -u $IDS $USERNAME
7 mkdir -p /home/$USERNAME/.ssh && touch /home/$USERNAME/.ssh/authorized_keys
8 chmod 0700 /home/$USERNAME/.ssh && chmod 0600 /home/$USERNAME/.ssh/authorized_keys
9 chown -R $USERNAME:$USERNAME /home/$USERNAME/.ssh
10 usermod -g 2000 $USERNAME
12 ln -s /mounted/repos /home/$USERNAME/repos