X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=bin%2Fpasswd.import;h=78413c8f5bcb0027443ec94639b367e68b45cb74;hb=05430ec3d4d7d2303c0d8012d195923ec86fc289;hp=fbf27370f5bce96faa3245e0580555487111d1b9;hpb=d35af6bf3827731fc639b975616b941d1e470183;p=freeside.git diff --git a/bin/passwd.import b/bin/passwd.import index fbf27370f..78413c8f5 100755 --- a/bin/passwd.import +++ b/bin/passwd.import @@ -1,5 +1,5 @@ #!/usr/bin/perl -Tw -# $Id: passwd.import,v 1.5 2002-06-21 09:57:05 ivan Exp $ +# $Id: passwd.import,v 1.5.4.4 2004-12-24 23:27:35 ivan Exp $ use strict; use vars qw(%part_svc); @@ -14,7 +14,7 @@ use FS::part_svc; my $user = shift or die &usage; adminsuidsetup $user; -push @FS::svc_acct::shells, qw(/bin/sync /sbin/shuddown /bin/halt); #others? +push @FS::svc_acct::shells, qw(/bin/sync /sbin/shutdown /bin/halt /sbin/halt); #others? my($spooldir)="/usr/local/etc/freeside/export.". datasrc; @@ -76,6 +76,8 @@ while () { my($username,$password)=split(/:/); #$password =~ s/^\!$/\*/; #$password =~ s/\!+/\*SUSPENDED\* /; + $password =~ s/^NP$/\*/; + $password =~ s/^\*LK\*$/\*/; $password{$username}=$password; } @@ -104,7 +106,13 @@ while () { }); my($error); $error=$svc_acct->insert; - die $error if $error; + if ( $error ) { + if ( $error =~ /duplicate/i ) { + warn "$username: $error"; + } else { + die "$username: $error"; + } + } }