App-upf
view release on metacpan or search on metacpan
add_delete_user_groups(user=>'u',add_to=>['a','b'],delete_from=>['c','d']);
is equivalent to:
add_user_to_group (user=>'u', group=>'a');
add_user_to_group (user=>'u', group=>'b');
delete_user_from_group(user=>'u', group=>'c');
delete_user_from_group(user=>'u', group=>'d');
except that C<add_delete_user_groups()> does it in one pass.
=head2 B<add-group>
Add a new group.
=head2 B<add-user>
Add a new user.
=head2 B<add-user-to-group>
Add user to a group.
=head2 B<delete-group>
Delete a group.
=head2 B<delete-user>
Delete a user.
=head2 B<delete-user-from-group>
Delete user from a group.
=head2 B<get-group>
Get group details by group name or gid.
Either C<group> OR C<gid> must be specified.
The function is not dissimilar to Unix's C<getgrnam()> or C<getgrgid()>.
=head2 B<get-max-gid>
Get maximum GID used.
=head2 B<get-max-uid>
Get maximum UID used.
=head2 B<get-user>
Get user details by username or uid.
Either C<user> OR C<uid> must be specified.
The function is not dissimilar to Unix's C<getpwnam()> or C<getpwuid()>.
=head2 B<get-user-groups>
Return groups which the user belongs to.
=head2 B<group-exists>
Check whether group exists.
=head2 B<is-member>
Check whether user is member of a group.
=head2 B<list-groups>
List Unix groups in group file.
=head2 B<list-users>
List Unix users in passwd file.
=head2 B<list-users-and-groups>
List Unix users and groups in passwd/group files.
This is basically C<list_users()> and C<list_groups()> combined, so you can get
both data in a single call. Data is returned in an array. Users list is in the
first element, groups list in the second.
=head2 B<modify-group>
Modify an existing group.
Specify arguments to modify corresponding fields. Unspecified fields will not be
modified.
=head2 B<modify-user>
Modify an existing user.
Specify arguments to modify corresponding fields. Unspecified fields will not be
modified.
=head2 B<set-user-groups>
Set the groups that a user is member of.
=head2 B<set-user-password>
Set user's password.
=head2 B<user-exists>
Check whether user exists.
=head1 OPTIONS
( run in 1.215 second using v1.01-cache-2.11-cpan-39bf76dae61 )