Diff for /loncom/pwchange between versions 1.9 and 1.10

version 1.9, 2003/02/03 18:03:52 version 1.10, 2009/07/17 02:20:59
Line 52  foreach (split(//,$pword)) {if ((ord($_) Line 52  foreach (split(//,$pword)) {if ((ord($_)
 exit 3 if $pbad;  exit 3 if $pbad;
   
 # --------------------------------------------------------- Call system command  # --------------------------------------------------------- Call system command
 open OUT,"|passwd --stdin $safe >/dev/null";  my $distro;
 print OUT $pword;  if (open(PIPE,"perl distprobe|")) {
 print OUT "\n";      $distro = <PIPE>;
 close OUT;      close(PIPE);
   }
   if ($distro =~ /^ubuntu|debian/) {
       open(OUT,"|/usr/sbin/usermod -p `mkpasswd $pword` $safe");
       close(OUT);
   } else {
       open(OUT,"|passwd --stdin $safe >/dev/null");
       print OUT $pword;
       print OUT "\n";
       close(OUT);
   }
   
 # --------------------------------------- exit with status of command execution  # --------------------------------------- exit with status of command execution
 exit $?/256;  exit $?/256;

Removed from v.1.9  
changed lines
  Added in v.1.10


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>