1: #!/usr/bin/perl
   2: while ((@_=split ':',($_=<>))&&($_=$_[0])) {$e?(print join
   3: ':',$_,$h{$_},($_[2])x2,'',0,0,@_[4..$#_]):($h{$_}=$_[1]); $e||=eof;}

Replies are listed 'Best First'.
RE: ./whatever /etc/shadow /etc/passwd master.passwd.in
by kryten (Scribe) on Apr 26, 2000 at 12:27 UTC
    This one has been bugging me for a while now.
    It seems to just print out the contents of the files passed in, after spliting them up and putting them together again in a slightly odder way.
    What is it for?
      It is for merging the contents of /etc/passwd and /etc/shadow on a system with shadow passwords (like Solaris). It inserts the encrypted password from /etc/shadow into its proper place and prints the result.

      It could be useful for generating a full password file that you could use with Crack, for example.

      I'm not sure why the title has the "master.passwd.in" as a third argument. I don't see how that gets used.