mailiverse/install/create-server-account-user.remote

15 lines
356 B
Plaintext
Raw Normal View History

2013-08-16 15:34:54 -04:00
set -x
USER=$1
sudo useradd -m $USER
sudo usermod -s /bin/bash $USER
sudo mkdir ../$USER/.ssh
cat authorized_keys | sudo tee -a ../$USER/.ssh/authorized_keys
2013-08-16 15:34:54 -04:00
sudo chown $USER ../$USER/.ssh ../$USER/.ssh/*
sudo chgrp $USER ../$USER/.ssh ../$USER/.ssh/*
sudo chmod 0700 ../$USER/.ssh
sudo chmod 0644 ../$USER/.ssh/authorized_keys
2013-08-19 14:53:13 -04:00
sudo chmod 0700 ../$USER