From a0b2cd8275acf083038414f9eca193940d5c13b3 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Mon, 6 Jul 2020 17:20:35 +0200 Subject: Bug fix --- gitjoe-newuser.pl | 10 +++++----- 1 file 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' ); } -- cgit v1.2.3