Name
CatalystX::Usul::Users::Simple - User data store in local files
Version
0.7.$Revision: 1181 $
Synopsis
use CatalystX::Usul::Users::Unix;
my $class = CatalystX::Usul::Users::Unix;
my $user_obj = $class->new( $attrs, $app );
Description
User storage model for the Unix operating system. This model makes use of a setuid wrapper to read and write the files; /etc/passwd, /etc/shadow and /etc/group. It inherits from CatalystX::Usul::Model::Identity::Users and implements the required list of factory methods
Subroutines/Methods
new
Constructor defined four attributes; binsdir the path to the programs, ppath the path to the passwd file, profdir the path to the directory which contains boilerplate "dot" file for populating the home directory, and spath the path to the shadow password file
get_features
Returns a hashref of features supported by this store. Can be checked using supports
activate_account
Activation is not currently supported by this store
assert_user
Returns a File::DataClass user object for the specified user or throws an exception if the user does not exist
change_password
Calls the setuserid wrapper to change the users password
check_password
Calls the setuserid wrapper to check the users password
create
Calls the setuserid wrapper to create a new user account, populate the home directory and create a mail alias for the users email address to the new account
delete
Calls the setuserid wrapper to delete the users mail alias and then delete the account
get_field_map
Returns a reference to the package scoped variable %FIELD_MAP
get_primary_rid
Returns the users primary role (group) id from the /etc/passwd file
get_user
Returns a hashref containing the data fields for the requested user. Maps the field name specific to the store to those used by the identity model
get_users_by_rid
Returns the list of users the share the given primary role (group) id
is_user
Returns true if the user exists, false otherwise
list
Returns the list of usernames matching the given pattern
set_password
Calls the setuserid wrapper to set the users password to a given value
update
Calls the setuserid wrapper to update the user account information
update_password
Updates the users password in the database
user_report
Calls the setuserid wrapper to create a report about the user accounts in this store
Diagnostics
None
Configuration and Environment
None
Dependencies
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) 2008 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