scripts and tools to administer the lingy.in public unix / tilde
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

19 linhas
429B

  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 | grep -v "nobody:"` =~ /([^:]+):[^:]+:[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. }