diff --git a/src/freedombone-adduser b/src/freedombone-adduser index 334e518d..ec463422 100755 --- a/src/freedombone-adduser +++ b/src/freedombone-adduser @@ -35,11 +35,13 @@ if [ "$SSH_PUBLIC_KEY" ]; then if [ -f "$SSH_PUBLIC_KEY" ]; then mkdir /home/$MY_USERNAME/.ssh cp $SSH_PUBLIC_KEY /home/$MY_USERNAME/.ssh/authorized_keys + chown -R $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/.ssh echo 'ssh public key installed' else if [[ "$SSH_PUBLIC_KEY" == "ssh-"* ]]; then mkdir /home/$MY_USERNAME/.ssh echo "$SSH_PUBLIC_KEY" > /home/$MY_USERNAME/.ssh/authorized_keys + chown -R $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/.ssh echo 'ssh public key installed' else echo 'The second parameter does not look like an ssh key'