Home: Need a Custom or Prewritten Perl Program?: I need a program that...:
.. A program to read through a dummy password file ...



foxy
Deleted

Aug 9, 2000, 1:11 PM


Views: 3749
.. A program to read through a dummy password file ...

Help !! I urgently need some pointers on a simple PERL program !! The prog. has to read through a dummy password file, that should output a list of usernames who are required to change their password.

Format of dummy file is :

username:password:dd/mm/yy:shell


ANY pointers would be gratefully received !!

THANX !!


Kanji
User / Moderator

Aug 9, 2000, 3:09 PM


Views: 3749
Re: .. A program to read through a dummy password file ...

<BLOCKQUOTE><font size="1" face="Arial,Helvetica,sans serif">code:</font><HR>

open DUMMY, "/path/to/dummy" or die("Can't open dummy: $!";
while ( <DUMMY> ) {
chomp; # lose the \n
my ($user,$pass,$date,$shell) = split /:/;
print $user, "\n";
}</pre><HR></BLOCKQUOTE>