Parcourir la source

added provision.pl. added check for /etc/passwd admin user.

tags/release-00
gashapwn il y a 3 ans
Parent
révision
2901c397a7
1 fichiers modifiés avec 18 ajouts et 0 suppressions
  1. +18
    -0
      perl-script/provision.pl

+ 18
- 0
perl-script/provision.pl Voir le fichier

@@ -0,0 +1,18 @@
#!/usr/bin/perl

use warnings;
use strict;

# This script is intended to be run on a fresh
# OpenBSD install

my $admin_un;

# Check /etc/passwd for the username created during
# installation
if( ($admin_un) = `tail /etc/passwd` =~ /^([^:]+):[^:]+:[0-9]{4,}/){
printf("admin user will be set to %s\n", $admin_un);
}else{
die "create a non-root user & set user passsword before running this script."
}


Chargement…
Annuler
Enregistrer