don't print the password in the authorized_keys on the host
This commit is contained in:
parent
6bfc7e3275
commit
0ea8bcbda3
|
@ -23,7 +23,7 @@
|
||||||
# 2019/05/31 added: check for OpenBSD 6.6 vmctl command line syntax change
|
# 2019/05/31 added: check for OpenBSD 6.6 vmctl command line syntax change
|
||||||
# 2019/09/29 added: doas.conf for pkill option
|
# 2019/09/29 added: doas.conf for pkill option
|
||||||
# 2020/05/10 changed: includes all install sets, inline with sysupgrade
|
# 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 5.024;
|
||||||
use strict;
|
use strict;
|
||||||
|
@ -246,7 +246,7 @@ sub create_accounts {
|
||||||
chomp($encrypt_pass);
|
chomp($encrypt_pass);
|
||||||
my $output = qx(/usr/sbin/useradd -m -G $_group -p '${encrypt_pass}' $_owner);
|
my $output = qx(/usr/sbin/useradd -m -G $_group -p '${encrypt_pass}' $_owner);
|
||||||
open my $fh_authorized, ">>", "/home/$_owner/.ssh/authorized_keys";
|
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;
|
close $fh_authorized;
|
||||||
printf "%16s %s account created\n", $_instance, $_owner;
|
printf "%16s %s account created\n", $_instance, $_owner;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue