Peter Flanigan > CatalystX-Usul > CatalystX::Usul::Roles::Unix

Download:
catalystx-usul/CatalystX-Usul-0.17.1.tar.gz

Dependencies

Annotate this POD

Website

CPAN RT

Open  0
View/Report Bugs
Module Version: v0.17.1   Source  

Name ^

CatalystX::Usul::Roles::Unix - Group management for the Unix OS

Version ^

Describes v0.17.$Rev: 1 $

Synopsis ^

   use CatalystX::Usul::Roles::Unix;

   my $class = CatalystX::Usul::Roles::Unix;

   my $role_obj = $class->new( $attr );

Description ^

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

Configuration and Environment ^

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) ]

inc

A positive integer which defaults to 1. The gap to leave between new group ids

Subroutines/Methods ^

add_user_to_role

   $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

create

   $out = $role_obj->create( $groupname );

Calls the suid root wrapper to create a new group

delete

   $out = $role_obj->delete( $groupname );

Calls the suid root wrapper to delete an existing group

remove_user_from_role

   $out = $role_obj->remove_user_to_role( $groupname, $username );

Calls the suid root wrapper to remove the given user from the specified group

roles_update

   $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

Diagnostics ^

None

Dependencies ^

CatalystX::Usul::Roles
CatalystX::Usul::Moose
File::UnixAuth
TryCatch

Incompatibilities ^

There are no known incompatibilities in this module

Bugs and Limitations ^

There are no known bugs in this module. Please report problems to the address below. Patches are welcome

Author ^

Peter Flanigan, <Support at RoxSoft.co.uk>

License and Copyright ^

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

syntax highlighting: