Change User Profile UID or GID (QSYCHGID) API


  Required Parameter Group:


  Default Public Authority: *USE

  Threadsafe: No

The Change User Profile UID or GID (QSYCHGID) API provides an interface to change the user ID number (UID) or group ID number (GID) for a user profile. The UID or GID value for any user profile on the system may be changed. If the UID value is changed and the user profile owns objects in a directory (not including objects in the QSYS.LIB or QDLS file system), then the UID information for these objects is also changed. If the GID value is changed and the user profile is the primary group for objects in a directory, then the GID information for these objects is also changed. The UID or GID of a profile that is active in a process can be changed only when the system is in restricted state. (For example, the system would probably have to be in restricted state to change the UID for the QSYS user profile.) However, the UID of the user profile currently running cannot be changed, and the GID of the groups for the user profile currently running cannot be changed.


Authorities and Locks

User Profile Authority
*ALLOBJ and *SECADM
User Profile Lock
*EXCL

Required Parameter Group

User profile name
INPUT; CHAR(10)

The name of the user profile whose UID or GID is to be changed.

User ID number (UID)
INPUT; BINARY(4)

The new UID for the user profile.

This field must contain one of the following values:


Group ID number (GID)
INPUT; BINARY(4)

The new GID for the user profile.

This field must contain one of the following values:


Error code
I/O; CHAR(*)

The structure in which to return error information. For the format of the structure, see Error code parameter.


Error Messages



API introduced: V2R3

[ Back to top | Security APIs | APIs by category ]