User account expiration control panel for SME Server
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.
 
 

24 lines
558 B

#!/usr/bin/perl -w
use strict;
use esmith::AccountsDB;
use User::pwent;
my $a = esmith::AccountsDB->open || die "Couldn't open the AccountsDB\n";
my $event = $ARGV[0];
my $user = $ARGV[1];
if (!$event){
die "Event must be specified\n";
}
if (!$user){
die "User must be specified\n";
}
my $rec = $a->get($user) || die "user $user not found in AccountsDB\n";
$rec->del_prop('ExpireLockedOn');
$rec->del_prop('ExpireAutoReply');
unlink glob (getpwnam($userName)->dir . "/.lock-auto-reply/*" )
if -d getpwnam($userName)->dir . "/.lock-auto-reply/";