create_user.pl + provision.pl - updated usage info stuff
This commit is contained in:
parent
b30ebc7f23
commit
de10cf77bc
@ -114,7 +114,10 @@ if(`pwd` =~ /perl-script\/?\s*$/){
|
|||||||
}elsif(!(join(" ", glob("./*")) =~ /perl-script/)){
|
}elsif(!(join(" ", glob("./*")) =~ /perl-script/)){
|
||||||
$SHELL_ENUM = {"SHELL_KSH" => "/bin/ksh"};
|
$SHELL_ENUM = {"SHELL_KSH" => "/bin/ksh"};
|
||||||
create(0);
|
create(0);
|
||||||
die "done...\n";
|
printf("admin user is now configured");
|
||||||
|
printf("run the below command to continue the install");
|
||||||
|
printf("pkg_add wget && wget 'https://git.lain.church/gashapwn/lyadmin/raw/branch/master/perl-script/provision.pl' -O - | perl");
|
||||||
|
die "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
# Opens the conf file to read
|
# Opens the conf file to read
|
||||||
|
@ -32,10 +32,12 @@ if($pwuid ne "root"){
|
|||||||
|
|
||||||
unless( ($admin_un) = `tail /etc/passwd | grep -v "nobody:"` =~ /([^:\n]+):[^:]+:[0-9]{4,}/){
|
unless( ($admin_un) = `tail /etc/passwd | grep -v "nobody:"` =~ /([^:\n]+):[^:]+:[0-9]{4,}/){
|
||||||
system("pkg_add p5-JSON");
|
system("pkg_add p5-JSON");
|
||||||
`wget --quiet https://git.lain.church/gashapwn/lyadmin/raw/branch/gasha-branch/perl-script/create_user.pl -O create_admin.pl`;
|
|
||||||
printf("run create_admin.pl to create an admin user\n");
|
|
||||||
|
|
||||||
die "or add with useradd and add an ssh key to ~/.ssh/authorizedkeys\n";
|
`wget --quiet https://git.lain.church/gashapwn/lyadmin/raw/branch/gasha-branch/perl-script/create_user.pl -O create_admin.pl`;
|
||||||
|
|
||||||
|
printf("to provision the instance there must be a non root user with an authorized_keys file");
|
||||||
|
printf("run create_admin.pl to create an admin user\n");
|
||||||
|
die "or add with useradd and add an ssh key to ~/.ssh/authorized_keys\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
# install git
|
# install git
|
||||||
|
Loading…
Reference in New Issue
Block a user