diff options
author | makefu <github@syntax-fehler.de> | 2013-08-30 01:53:03 +0200 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2013-08-30 01:53:03 +0200 |
commit | f58e5d03242cee416ad184d96a8bb541823e4cc9 (patch) | |
tree | 0697069d26d31c2e951cdfd04ce6211a30a18946 /infest | |
parent | 4987f3d6e914e36d75c2442910d4414665858619 (diff) |
fix makefu -> id -u -n
Diffstat (limited to 'infest')
-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 |