scripts and tools to administer the lingy.in public unix / tilde
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
409B

  1. #!/usr/bin/perl
  2. use warnings;
  3. use strict;
  4. # This script is intended to be run on a fresh
  5. # OpenBSD install
  6. my $admin_un;
  7. # Check /etc/passwd for the username created during
  8. # installation
  9. if( ($admin_un) = `tail /etc/passwd` =~ /([^:]+):[^:]+:[0-9]{4,}/){
  10. printf("admin user will be set to %s\n", $admin_un);
  11. }else{
  12. die "create a non-root user & set user passsword before running this script."
  13. }