CatalystX::Usul::Roles::Unix - Group management for the Unix OS
Describes v0.16.$Rev: 1 $
use CatalystX::Usul::Roles::Unix; my $class = CatalystX::Usul::Roles::Unix; my $role_obj = $class->new( $attr );
Methods to manipulate the group file which defaults to /etc/group. This class implements the methods required by it's base class CatalystX::Usul::Roles
Defines the following attributes;
baseid
A positive integer which defaults to 1000. New id must will be greater than or equal to this value
group_obj
A lazily constructed object which cannot be passed in the constructor. It is an instance of File::UnixAuth
group_path
A file which is coerced from the default array ref [ NUL, qw(etc group) ]
[ NUL, qw(etc group) ]
inc
A positive integer which defaults to 1. The gap to leave between new group ids
$out = $role_obj->add_user_to_role( $groupname, $username );
Calls the suid root wrapper to add the specified user to the specified group. Returns the output from running the command
$out = $role_obj->create( $groupname );
Calls the suid root wrapper to create a new group
$out = $role_obj->delete( $groupname );
Calls the suid root wrapper to delete an existing group
$out = $role_obj->remove_user_to_role( $groupname, $username );
Calls the suid root wrapper to remove the given user from the specified group
$out = $role_obj->roles_update( $cmd, $field, $username, $groupname );
Called from the suid root wrapper this is the method that updates the group file. The $cmd is either add or delete. The $field is either user or group
$cmd
$field
None
There are no known incompatibilities in this module
There are no known bugs in this module. Please report problems to the address below. Patches are welcome
Peter Flanigan, <Support at RoxSoft.co.uk>
<Support at RoxSoft.co.uk>
Copyright (c) 2014 Peter Flanigan. All rights reserved
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic
This program is distributed in the hope that it will be useful, but WITHOUT WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE
To install CatalystX::Usul, copy and paste the appropriate command in to your terminal.
cpanm
cpanm CatalystX::Usul
CPAN shell
perl -MCPAN -e shell install CatalystX::Usul
For more information on module installation, please visit the detailed CPAN module installation guide.