diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-07-26 15:17:53 +0200 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-07-26 15:17:53 +0200 |
commit | 90da95215ccb63ec05739394caa6f249e88fbe7c (patch) | |
tree | 921bb07daecb67f9e4a0f1e7e9e2e315ede2d63a | |
parent | Typo (diff) | |
download | joe-scripts-90da95215ccb63ec05739394caa6f249e88fbe7c.tar.gz joe-scripts-90da95215ccb63ec05739394caa6f249e88fbe7c.tar.bz2 joe-scripts-90da95215ccb63ec05739394caa6f249e88fbe7c.tar.xz joe-scripts-90da95215ccb63ec05739394caa6f249e88fbe7c.tar.zst joe-scripts-90da95215ccb63ec05739394caa6f249e88fbe7c.zip |
Trying with random passwords
-rwxr-xr-x | src/gitjoe/adduser.pl | 22 |
1 files changed, 1 insertions, 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; } |