Name
CatalystX::Usul::Users::UnixAdmin - Set uid root methods for account manipulation
Version
0.8.$Revision: 1320 $
Synopsis
use CatalystX::Usul::Users::UnixAdmin;
Description
The public methods are called from a program running setuid root. The methods enable the management of OS accounts
Configuration and Environment
Defines the following attributes
def_perms
-
The default permissions applied to new home directories,
0755
profdir
-
A path coerced from an array ref that contains the files used to provision a new account
Subroutines/Methods
create_account
$self->create_account( $path );
Creates an OS account. The given path is an XML file containing the account parameters. Account profiles are obtained from the $self->profile_domain
object. New entries are added to the passwd
file, the shadow
file (if it is being used) and the group
file
delete_account
$self->delete_account( $user ):
Deletes an OS account. The accounts home directory is removed, the users entries in the group
file are removed as are the entries in the passwd
and shadow
files
populate_account
$self->create_account( $path );
Creates the new users home directory and populates it with some "dot" files if templates for such exist in the $self->profdir
directory. Does not create a directory if the users home directory matches $profile->common_home
. Account parameters are read from the XML file given by $path
update_account
$self->update_account( $path );
Account parameters are read from the XML file given by $path
. Updates entries in the passwd
file
update_password
$self->update_password( $force, $user, $old_pw, $new_pw, $encrypted );
Updates the users password only if the new one has not been used before or there is an administrative override. Updates the shadow file file if it is used, or the passwd file otherwise
user_report
$self->user_report( $path, $format );
Creates a report of user accounts. Outputs to $path
or STDOUT
if $path
is -
. Format is either text
or csv
Diagnostics
None
Dependencies
- CatalystX::Usul::Users::Unix
- CatalystX::Usul::Moose
- Class::Usul::Time
- CatalystX::Usul::Constraints
- File::Path
- 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) 2013 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