From 90da95215ccb63ec05739394caa6f249e88fbe7c Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Sun, 26 Jul 2020 15:17:53 +0200 Subject: Trying with random passwords --- src/gitjoe/adduser.pl | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/src/gitjoe/adduser.pl b/src/gitjoe/adduser.pl index 92a3ed5..844000e 100755 --- a/src/gitjoe/adduser.pl +++ b/src/gitjoe/adduser.pl @@ -33,9 +33,7 @@ git-shell - -" . $pass . " -" . $pass . " +yes yes no @@ -44,29 +42,11 @@ EOF" my (undef, undef, $uid, $gid) = getpwnam($usr); mkdir $home_dir . '.ssh/', 0700; chown $uid, $gid, $home_dir . '.ssh/'; - # system( - # '/usr/sbin/chown', - # '-v', - # $usr . ':' . $usr, - # $home_dir . '.ssh/' - # ); open(my $fh, '>:encoding(UTF-8)', $home_dir . '.ssh/authorized_keys'); print $fh $sshkey . "\n"; close($fh); chown $uid, $gid, $home_dir . '.ssh/authorized_keys'; - # system( - # '/usr/sbin/chown', - # '-v', - # $usr . ':' . $usr, - # $home_dir . '.ssh/authorized_keys' - # ); chmod 0600, $home_dir . '.ssh/authorized_keys'; - # system( - # '/bin/chmod', - # '-v', - # '600', - # $home_dir . '.ssh/authorized_keys' - # ); print "Created new git user " . colored($usr, 'bold green') . ".\n"; exit; } -- cgit v1.2.3