CHGSECA (Change Security Attributes)
CHGSECA Command syntax diagram
Purpose
The Change Security Attributes (CHGSECA) command changes the security attributes of a system. This command can be issued to:
- Change the starting value for user ID numbers (UID) that are generated for user profiles.
- Change the starting value for group ID number (GID) that are generated for user profiles.
When the UID (user ID number) is being changed, a search is made for the first available user ID number, starting at the specified value. When the GID (group ID number) is being changed, a search is made for the first available group ID number, starting at the specified value. If the maximum number is reached before an available number is found, the search will wrap and continue searching starting at 101. These numbers will then be used the next time a UID or GID is generated, for example, when the Create User Profile (CRTUSRPRF) command is issued and *GEN is specified for the UID parameter or the GID parameter, or when profiles are restored. Each subsequent time a UID or GID is generated, the search starts with the last used UID or GID that was generated.
If the UID or GID parameter is not entered or *SAME is entered, no change will be made to the starting value.
Use this command to set the starting point for generating UIDs or GIDs on an iSeries 400 to one value (for example 3000) and the starting point on a different system could be set to a different value (for example 5000). This facilitates generating unique UID or GID values on multiple systems in a network.
The Change User Profile (CHGUSRPRF) command or the Change User Profile UID or GID (QSYCHGID) API can be used to specify the same UID for profiles on different systems or to specify the same GID for profiles on different systems.
Restrictions
You must have *SECADM special authority to use this command.
Optional Parameters
- UID
- Specifies the new starting value at which a search for an available user ID (UID) number will begin.
*SAME: No change is made to the starting value for generated UIDs.
user-ID-number: Specifies the new starting value at which a search for an available UID number will begin. This can be from 101 to 4294967294.
- GID
- Specifies the new starting value at which a search for an available group ID (GID) number will begin.
*SAME: No change is made to the starting value for generated GIDs.
group-ID-number: Specifies the new starting value at which a search for an available GID number will begin. This can be from 101 to 4294967294.
Example for CHGSECA
CHGSECA UID(2000) GID(3000)User ID numbers generated after this command has run will start with the first available user ID number found with the search starting at 2000. Group ID numbers generated after this command has run will start with the first available user ID number found with the search starting at 3000.
Error messages for CHGSECA
*ESCAPE Messages
- CPFB304
- User does not have required special authorities.