You mean aside from Unix::PasswdFile, Passwd::Solaris and Passwd::Linux, or AnyData::Format::Passwd?
Or the built-in getpwent and friends? (Which has the benefit of probably honoring the local system's NIS or other remote password source)
Nope. nothing.
Update: OK, those middle two are for adding and removing new entries from the corresponding OS' passwd files rather than parsing out contents so they probably don't count as "parsing passwd" modules.
| [reply] [d/l] |
There's a function -- getpwent, so I guess there hasn't been as much need for it. (besides, it's just a colon delim file, so most other parsing programs could do it).
I'd also like to point out that there is no 'name' field in a passwd file -- it's the gecos field, which contains a comma seperated list of optional comments, the first of which is typically the name. (which is why you get odd behavior when someone tries entering a name in 'last, first' format.) From perldoc -f getpwent : The exact meaning of the $gcos field varies but it usually contains the real name of the user (as opposed to the login name)
and other information pertaining to the user. Beware, however,
that in many system users are able to change this information
and therefore it cannot be trusted and therefore the $gcos is
tainted (see perlsec). The $passwd and $shell, user's
encrypted password and login shell, are also tainted, because
of the same reason.
| [reply] [d/l] |
Maybe I have put the wrong name - it is quite "silent",
but what can be more expressive than usermod?
#!/usr/bin/perl
use strict;
use Linux::usermod;
my %users = Linux::usermod::users();
print join "\n", keys %users
__END__
# STDOUT:
backup
bin
cv
daemon
games
gnats
helpdesk
identd
irc
list
lp
mail
man
mysql
netsaint
news
nobody
operator
popa3d
postfix
postgres
proxy
reni
root
snort
spong
sshd
su
sync
sys
uucp
vidul
vis
www-data
# all those looks like system user accounts to me :)
| [reply] [d/l] |