mirror of
https://github.com/moparisthebest/mailiverse
synced 2024-11-05 17:05:07 -05:00
14 lines
331 B
Plaintext
Executable File
14 lines
331 B
Plaintext
Executable File
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
|
|
|
|
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
|