aboutsummaryrefslogtreecommitdiffstats
path: root/src/gitjoe/adduser.pl
diff options
context:
space:
mode:
Diffstat (limited to 'src/gitjoe/adduser.pl')
-rwxr-xr-xsrc/gitjoe/adduser.pl22
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;
}