X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=bin%2Fsvc_acct.export;h=3ac7a4f8fc4714870e0b06ed779b3dfc951be083;hb=be58a1538ce963c4d3b6319c163960513703108d;hp=bc27f7f02e16df5f3fd8fadba185d6e019925c03;hpb=fcb5658290eb457f0b2493b405c152a9cc1ad5a4;p=freeside.git diff --git a/bin/svc_acct.export b/bin/svc_acct.export index bc27f7f02..3ac7a4f8f 100755 --- a/bin/svc_acct.export +++ b/bin/svc_acct.export @@ -1,6 +1,6 @@ #!/usr/bin/perl -w # -# $Id: svc_acct.export,v 1.25 2001-10-16 20:33:02 jeff Exp $ +# $Id: svc_acct.export,v 1.28 2001-12-12 07:59:33 ivan Exp $ # # Create and export password, radius and vpopmail password files: # passwd, passwd.adjunct, shadow, acp_passwd, acp_userinfo, acp_dialup @@ -68,6 +68,12 @@ my $textradiusprepend = warn "using depriciated textradiusprepend file" if $textradiusprepend; + +my $radiusprepend = + $conf->exists('radiusprepend') + ? $conf->config('radiusprepend') + : ''; + my @vpopmailmachines = $conf->config('vpopmailmachines') if $conf->exists('vpopmailmachines'); my $vpopmailrestart = ''; @@ -190,6 +196,8 @@ if ( $icradiusmachines ) { setpriority(0,0,10); +print USERS "$radiusprepend\n"; + my %usernames; ## this hack helps keep the passwd files sane my @sendmail; @@ -254,7 +262,8 @@ foreach $svc_domain (sort {$a->domain cmp $b->domain} @svc_domain) { foreach $svc_acct (qsearch('svc_acct', {'domsvc' => $svc_domain->svcnum})) { my($password)=$svc_acct->getfield('_password'); my($cpassword,$rpassword); - if ( ( length($password) <= 8 ) + #if ( ( length($password) <= 8 ) + if ( ( length($password) <= 12 ) && ( $password ne '*' ) && ( $password ne '!!' ) && ( $password ne '' ) @@ -564,7 +573,8 @@ foreach $bsdshellmachine (@bsdshellmachines) { ssh("root\@$bsdshellmachine", "( ". "mv /etc/passwd.new /etc/passwd; ". - "mv /etc/master.passwd.new /etc/master.passwd; ". + #"mv /etc/master.passwd.new /etc/master.passwd; ". + "pwd_mkdb /etc/master.passwd.new; ". " )" ) == 0 or die "ssh error: $!";