don't print the password in the authorized_keys on the host

This commit is contained in:
mischa 2020-05-22 20:01:55 +02:00
parent 6bfc7e3275
commit 0ea8bcbda3
1 changed files with 2 additions and 2 deletions

View File

@ -23,7 +23,7 @@
# 2019/05/31 added: check for OpenBSD 6.6 vmctl command line syntax change
# 2019/09/29 added: doas.conf for pkill option
# 2020/05/10 changed: includes all install sets, inline with sysupgrade
# 2020/05/22 changed: set the hosts password for the user
# 2020/05/22 changed: set the hosts password for the users
#
use 5.024;
use strict;
@ -246,7 +246,7 @@ sub create_accounts {
chomp($encrypt_pass);
my $output = qx(/usr/sbin/useradd -m -G $_group -p '${encrypt_pass}' $_owner);
open my $fh_authorized, ">>", "/home/$_owner/.ssh/authorized_keys";
printf $fh_authorized "%s %s\n", $_sshkey, $jot_pass;
printf $fh_authorized "%s\n", $_sshkey;
close $fh_authorized;
printf "%16s %s account created\n", $_instance, $_owner;
}