NAME

TAM::Admin::User

SYNOPSIS

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

DESCRIPTION

TAM::Admin::User is a support module for the TAM::Admin module.

METHODS

Basic Attributes

id

Return the TAM ID of the user.

cn

Return the LDAP CN of the user.

sn

Return the LDAP SN of the user.

dn

Returns the LDAP DN of the user.

description(<description>)

Return the current description of the user. The method will set the description to the value of the first parameter, if passed.

valid(<valid>)

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.

gso(<valid>)

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.

Account Removal

remove

Remove the user from TAM only. This method is equivalent to the following pdadmin command.

pdadmin> user delete <userid>

delete

Remove the user from TAM and LDAP. This method is equivalent to the following pdadmin command.

pdadmin> user delete -registry <userid>

GSO Methods

add_gso(<gso>, <username>, <password>)

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.

all_gso

Returns an array of all GSO credential objects for the user. The items in the array will be TAM::Admin::GSO::Credential objects.

get_gso(<type> => <id>)

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.

Response Methods

ok

Returns true if the last action was successful.

error

Returns true if the last action was unsuccessful.

message([<index>])

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.

code([<index>])

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.

msg_count

Returns the number of errors generated for the last action.

AUTHOR

George Chlipala, george@walnutcs.com

SEE ALSO

perl(1).