diff --git a/perl-script/create_user.pl b/perl-script/create_user.pl index a7f40a3..7e672ca 100644 --- a/perl-script/create_user.pl +++ b/perl-script/create_user.pl @@ -114,7 +114,10 @@ if(`pwd` =~ /perl-script\/?\s*$/){ }elsif(!(join(" ", glob("./*")) =~ /perl-script/)){ $SHELL_ENUM = {"SHELL_KSH" => "/bin/ksh"}; 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 diff --git a/perl-script/provision.pl b/perl-script/provision.pl index 8131817..106ddba 100644 --- a/perl-script/provision.pl +++ b/perl-script/provision.pl @@ -32,10 +32,12 @@ if($pwuid ne "root"){ unless( ($admin_un) = `tail /etc/passwd | grep -v "nobody:"` =~ /([^:\n]+):[^:]+:[0-9]{4,}/){ 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"; + 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