PreviousNext

sec_rgy_acct_rename(3sec)

Changes an account login name

Synopsis

#include <dce/acct.h>

void sec_rgy_acct_rename(
sec_rgy_handle_t context,
sec_rgy_login_name_t *old_login_name,
sec_rgy_login_name_t *new_login_name,
sec_rgy_acct_key_t *new_key_parts,
error_status_t *status);

Parameters

Input

context
An opaque handle bound to a registry server. Use sec_rgy_site_open( ) to acquire a bound handle.

old_login_name
A pointer to the current account login name. The login name is composed of three character strings, containing the principal, group, and organization (PGO) names corresponding to the account. All three strings must be completely specified.

new_login_name
A pointer to the new account login name. Again, all three component names must be completely specified.

Input/Output

new_key_parts
A pointer to the minimum abbreviation allowed when logging in to the account. Abbreviations are not currently implemented and the only legal value is sec_rgy_acct_key_person.

Output

status
A pointer to the completion status. On successful completion, the routine returns error_status_ok. Otherwise, it returns an error.

Description
The sec_rgy_acct_rename( ) routine changes an account login name from old_login_name to new_login_name. Wildcards (empty fields) are not permitted in either input name; both the old and new login names must completely specify their component principal, group, and organization names. Note, though, that the principal component in a login name cannot be changed.

The new_key_parts variable identifies how many of the new_login_name parts to use as the unique abbreviation for the account. If the requested abbreviation duplicates an existing abbreviation for another account, the routine identifies the next shortest unique abbreviation and returns this abbreviation using new_key_parts.

Permissions Required
The sec_rgy_acct_rename( ) routine requires the m (mgmt_info) permission on the account principal to be renamed.

Notes
The sec_rgy_acct_rename( ) routine does not affect any of the registry PGO data. The constituent principal, group, and organization items for an account must be added before the account can be created. (See the sec_rgy_pgo_add( ) routine). Also, the principal must have been added as a member of the specified group and organization. (See the sec_rgy_pgo_add_member( ) routine).

Files

/usr/include/dce/acct.idl
The idl file from which dce/acct.h was derived.

Errors

The following describes a partial list of errors that might be returned. Refer to the OSF DCE Problem Determination Guide for complete descriptions of all error messages.

sec_rgy_not_authorized
The client program is not authorized to make the changes.

sec_rgy_object_not_found
The account to be modified was not found by the registry server.

sec_rgy_name_exists
The new account name is already in use by another account.

sec_rgy_server_unavailable
The DCE Registry Server is unavailable.

error_status_ok
The call was successful.

Related Information
Functions:

sec_intro(3sec)

sec_rgy_acct_add(3sec)