diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-07-06 17:20:35 +0200 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-07-06 17:20:35 +0200 |
commit | a0b2cd8275acf083038414f9eca193940d5c13b3 (patch) | |
tree | 4183d4adbab3bf7e0e6e12578c290eb3623d0457 | |
parent | Newuser update (diff) | |
download | joe-scripts-a0b2cd8275acf083038414f9eca193940d5c13b3.tar.gz joe-scripts-a0b2cd8275acf083038414f9eca193940d5c13b3.tar.bz2 joe-scripts-a0b2cd8275acf083038414f9eca193940d5c13b3.tar.xz joe-scripts-a0b2cd8275acf083038414f9eca193940d5c13b3.tar.zst joe-scripts-a0b2cd8275acf083038414f9eca193940d5c13b3.zip |
Bug fix
-rwxr-xr-x | gitjoe-newuser.pl | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gitjoe-newuser.pl b/gitjoe-newuser.pl index 5da9c2b..81e5a91 100755 --- a/gitjoe-newuser.pl +++ b/gitjoe-newuser.pl @@ -43,12 +43,12 @@ EOF" system( '/usr/local/bin/dash', '-c', - '/bin/mkdir -v ' . $home_dir . '.ssh'; + '/bin/mkdir -v ' . $home_dir . '.ssh' ); system( '/usr/local/bin/dash', '-c', - '/bin/chown -v ' . $usr . ':' . $usr . ' ' . $home_dir . '.ssh'; + '/bin/chown -v ' . $usr . ':' . $usr . ' ' . $home_dir . '.ssh' ); system( '/usr/local/bin/dash', @@ -56,17 +56,17 @@ EOF" '/bin/chmod -v 700 ' . $home_dir . '.ssh/'; ); open(my $fh, '>:encoding(UTF-8)', $home_dir . '.ssh/authorized_keys'); - print $fh $sshkey; + print $fh $sshkey . '\n'; close($fh); system( '/usr/local/bin/dash', '-c', - '/bin/chown -v ' . $usr . ':' . $usr . ' ' . $home_dir . '.ssh/authorized_keys'; + '/bin/chown -v ' . $usr . ':' . $usr . ' ' . $home_dir . '.ssh/authorized_keys' ); system( '/usr/local/bin/dash', '-c', - '/bin/chmod -v 600 ' . $home_dir . '.ssh/authorized_keys'; + '/bin/chmod -v 600 ' . $home_dir . '.ssh/authorized_keys' ); } |