diff options
Diffstat (limited to 'infest/deploy-ssh-keys')
-rw-r--r-- | infest/deploy-ssh-keys | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/infest/deploy-ssh-keys b/infest/deploy-ssh-keys index 1d0587d5..156e2795 100644 --- a/infest/deploy-ssh-keys +++ b/infest/deploy-ssh-keys @@ -1,9 +1,9 @@ #!/bin/sh cd $(dirname $0) -U="${1:-$USER}" +U="${1:-$(id -u -n)}" H="$(grep "^$U" /etc/passwd | cut -d : -f 6)" echo "deploying for user $U to $H/.ssh" mkdir -p $H/.ssh -chown $U $H -chown $U $H/.ssh cp -vr skel/home/.ssh/authorized_keys $H/.ssh +chown $U $H +chown -R $U $H/.ssh |