/[LeafOK_CVS]/pvpgn-1.7.4/scripts/lastlogin.pl
ViewVC logotype

Annotation of /pvpgn-1.7.4/scripts/lastlogin.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1.1.1 - (hide annotations) (vendor branch)
Tue Jun 6 03:41:37 2006 UTC (19 years, 9 months ago) by sysadm
Branch: GNU, MAIN
CVS Tags: arelease, HEAD
Changes since 1.1: +0 -0 lines
Content type: text/x-perl
no message

1 sysadm 1.1 #!/usr/bin/perl
2    
3     #Usage: lastlogins.pl <user directory>
4    
5     $ARGV[1] eq "" && die "error arguments";
6    
7     $userdir=$ARGV[0];
8     opendir(DIR,$userdir) || die "error open dir $userdir";
9     @files= grep { /^[^.]/ && -f "$userdir/$_" } readdir(DIR);
10     closedir DIR;
11    
12     $tbl{'name'}='"BNET\\acct\\lastlogin_time"';
13     foreach (@files) {
14     open(S_FILE,"$s_dir/$_") || die "error open s_file";
15     $dest_file=lc("$d_dir/$_");
16     while (<S_FILE>) {
17     chop($_);
18     ($name,$value)=split(/:/,$_);
19     foreach (keys %tbl) {
20     if ($_ eq $name) {
21     if ( $_ eq "password" ) {
22     $value=&passconv($value);
23     }
24     break;
25     }
26     }
27     }
28     $userid++;
29     close(S_FILE);
30     }

webmaster@leafok.com
ViewVC Help
Powered by ViewVC 1.3.0-beta1