Unix::Passwd::File

Manipulate /etc/{passwd,shadow,group,gshadow} entries
Download

Unix::Passwd::File Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Steven Haryanto
  • Publisher web site:
  • http://search.cpan.org/~sharyanto/

Unix::Passwd::File Tags


Unix::Passwd::File Description

Unix::Passwd::File is a Perl module can be used to read and manipulate entries in Unix system password files (/etc/passwd, /etc/group, /etc/group, /etc/gshadow; but can also be told to search in custom location, for testing purposes).SYNOPSIS use Unix::Passwd::Files; # by default uses files in /etc (/etc/passwd, /etc/shadow, et al) my $res = list_users(); # ] # change location of files, return details $res = list_users(etc_dir=>"/some/path", detail=>1); # ] # also return detail, but return array entries instead of hash $res = list_users(detail=>1, with_field_names=>0); # , ...]] # getting user/group $res = get_group(user=>"buzz"); # $res = get_user(user=>"neil"); # # adding user/group, by default adding user will also add a group with the same # name $res = add_user (user =>"steven", ...); # $res = add_group(group=>"steven", ...); # # modify user/group $res = modify_user(user=>"steven", home=>"/newhome/steven"); # $res = modify_group(group=>"neil"); # # deleting user will also delete user's group $res = delete_user(user=>"neil"); # change user password $res = set_user_password(user=>"steven", pass=>"foobar"); # add/delete user to/from group $res = add_user_to_group(user=>"steven", group=>"wheel"); $res = delete_user_from_group(user=>"steven", group=>"wheel"); # others $res = get_max_uid(); $res = get_max_gid();Product's homepage


Unix::Passwd::File Related Software