source: locker/sbin/parse-passwd.pl @ 722

Last change on this file since 722 was 722, checked in by price, 16 years ago
import sec-tools scripts Two of these are obsolete, named with .old in /mit/scripts/sec-tools; I'm going to remove them in the next commit. But they'll be in the svn history here, which is better than lying around with .old names.
  • Property svn:executable set to *
File size: 428 bytes
Line 
1#!/usr/bin/perl
2
3# Simple script taking a passwd file and storing the things with
4# sufficiently high UID in the right place
5
6use strict;
7my $file = $ARGV[0];
8my $file2 = $ARGV[1];
9open(FIN, "<$file");
10open(FOUT, ">$file2");
11
12while(<FIN>)
13{
14    my @passwd_line = split(':', $_);
15    if ($passwd_line[2] > 500000000) {
16        # Then it's a volume ID, thus a real user
17        print FOUT "$passwd_line[0]\n";
18    }
19}
20
21close(FIN);
22close(FOUT);
Note: See TracBrowser for help on using the repository browser.