TAM::Admin::User
use TAM::Admin; # Connect to the policy server as sec_master my $pdadmin = TAM::Admin->new('sec_master', 'password'); # Get the user with the ID joe and print basic information my $user = $pdadmin->get_user('joe'); print 'Login ID: ', $user->id, "\n"; print 'Login CN: ', $user->cn, "\n"; print 'Login DN: ', $user->dn, "\n"; if ( $user->valid ) { print "User account valid.\n"; } else { # Make the user account valid $user->valid(1); } # Make the user a Non-GSO user $user->gso(0);
TAM::Admin::User is a support module for the TAM::Admin module.
Return the TAM ID of the user.
Return the LDAP CN of the user.
Return the LDAP SN of the user.
Returns the LDAP DN of the user.
Return the current description of the user. The method will set the description to the value of the first parameter, if passed.
Returns true if the account is currently valid. The method will also set the account validity of the user if 1 (valid) or 0 (invalid) is passed as an argument.
Returns true if the account is a GSO user. The method will also set the GSO state of the user if 1 (GSO user) or 0 (non-GSO user) is passed as an argument.
Remove the user from TAM only. This method is equivalent to the following pdadmin command.
pdadmin> user delete <userid>
Remove the user from TAM and LDAP. This method is equivalent to the following pdadmin command.
pdadmin> user delete -registry <userid>
Create a new GSO credential for this user. The first argument is a GSO object that corresponds to the GSO resource to add the credential. The next two (2) arguments specify the username/password pair to be added into the new credential.
Returns an array of all GSO credential objects for the user. The items in the array will be TAM::Admin::GSO::Credential objects.
Return the a specific GSO credential object for the user. Type is ether 'group' or resource and ID is the label of the GSO resource. The returned object will be a TAM::Admin:GSO::Credential object.
Returns true if the last action was successful.
Returns true if the last action was unsuccessful.
Returns the error message for the last action. The index will specify which error message to return if the last action resulted in more that one error condition. The index is 0 based.
Returns the error code for the last action. The index will specify which error code to return if the last ction resulted in more that one error condition. The index is 0 based.
Returns the number of errors generated for the last action.
George Chlipala, george@walnutcs.com
perl(1).
To install TAM::Admin, copy and paste the appropriate command in to your terminal.
cpanm
cpanm TAM::Admin
CPAN shell
perl -MCPAN -e shell install TAM::Admin
For more information on module installation, please visit the detailed CPAN module installation guide.