|
Last change
on this file since 722 was
722,
checked in by price, 18 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 | |
|---|
| 6 | use strict; |
|---|
| 7 | my $file = $ARGV[0]; |
|---|
| 8 | my $file2 = $ARGV[1]; |
|---|
| 9 | open(FIN, "<$file"); |
|---|
| 10 | open(FOUT, ">$file2"); |
|---|
| 11 | |
|---|
| 12 | while(<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 | |
|---|
| 21 | close(FIN); |
|---|
| 22 | close(FOUT); |
|---|
Note: See
TracBrowser
for help on using the repository browser.