ibm-information-center/dist/eclipse/plugins/i5OS.ic.apis_5.4.0.1/QSYCHGID.htm

290 lines
7.7 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Copyright" content="Copyright (c) 2006 by IBM Corporation">
<title>Change User Profile UID or GID (QSYCHGID) API</title>
<!-- Begin Header Records ========================================== -->
<!-- All rights reserved. Licensed Materials Property of IBM -->
<!-- US Government Users Restricted Rights -->
<!-- Use, duplication or disclosure restricted by -->
<!-- GSA ADP Schedule Contract with IBM Corp. -->
<!-- Sec SCRIPT A converted by B2H R4.1 (346) (CMS) by V2KEA304 -->
<!-- at RCHVMW2 on 17 Feb 1999 at 11:05:09 -->
<!-- Change History: -->
<!-- YYMMDD USERID Change description -->
<!--File Edited by Kersten Dec 2001 -->
<!--End Header Records -->
<link rel="stylesheet" type="text/css" href="../rzahg/ic.css">
</head>
<body>
<a name="Top_Of_Page"></a>
<!-- Java sync-link -->
<script language="Javascript" src="../rzahg/synch.js" type="text/javascript">
</script>
<h2>Change User Profile UID or GID (QSYCHGID) API</h2>
<div class="box" style="width: 60%;">
<br>
&nbsp;&nbsp;Required Parameter Group:<br>
<!-- iddvc RMBR -->
<br>
<table width="100%">
<tr>
<td align="center" valign="top" width="10%">1</td>
<td align="left" valign="top" width="50%">User profile name</td>
<td align="left" valign="top" width="20%">Input</td>
<td align="left" valign="top" width="20%">Char(10)</td>
</tr>
<tr>
<td align="center" valign="top">2</td>
<td align="left" valign="top">User ID number (UID)</td>
<td align="left" valign="top">Input</td>
<td align="left" valign="top">Binary(4)</td>
</tr>
<tr>
<td align="center" valign="top">3</td>
<td align="left" valign="top">Group ID number (GID)</td>
<td align="left" valign="top">Input</td>
<td align="left" valign="top">Binary(4)</td>
</tr>
<tr>
<td align="center" valign="top">4</td>
<td align="left" valign="top">Error code</td>
<td align="left" valign="top">I/O</td>
<td align="left" valign="top">Char(*)</td>
</tr>
</table>
<br>
&nbsp;&nbsp;Default Public Authority: *USE<br>
<!-- iddvc RMBR -->
<br>
&nbsp;&nbsp;Threadsafe: No<br>
<!-- iddvc RMBR -->
<br>
</div>
<p>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.</p>
<br>
<h3>Authorities and Locks</h3>
<dl>
<dt><em>User Profile Authority</em></dt>
<dd>*ALLOBJ and *SECADM</dd>
<dt><em>User Profile Lock</em></dt>
<dd>*EXCL</dd>
</dl>
<br>
<h3>Required Parameter Group</h3>
<dl>
<dt><strong>User profile name</strong></dt>
<dd>INPUT; CHAR(10)
<p>The name of the user profile whose UID or GID is to be changed.</p>
</dd>
<dt><strong>User ID number (UID)</strong></dt>
<dd>INPUT; BINARY(4)
<p>The new UID for the user profile.</p>
<p>This field must contain one of the following values:</p>
<table cellpadding="5">
<!-- cols="15 85" -->
<tr>
<td align="left" valign="top" nowrap><em>1 to 4294967294</em></td>
<td align="left" valign="top">The new UID value.</td>
</tr>
<tr>
<td align="left" valign="top"><em>4294967295</em></td>
<td align="left" valign="top">The UID for this user profile does not change.
This value is the same as X'FFFFFFFF' or -1 in languages that do not support
unsigned integers.</td>
</tr>
</table>
<br>
</dd>
<dt><strong>Group ID number (GID)</strong></dt>
<dd>INPUT; BINARY(4)
<p>The new GID for the user profile.</p>
<p>This field must contain one of the following values:</p>
<table cellpadding="5">
<!-- cols="15 85" -->
<tr>
<td align="left" valign="top" nowrap><em>1 to 4294967294</em></td>
<td align="left" valign="top">The new GID.</td>
</tr>
<tr>
<td align="left" valign="top"><em>4294967295</em></td>
<td align="left" valign="top">The GID for this user profile does not change.
This value is the same as X'FFFFFFFF' or -1 in languages that do not support
unsigned integers.</td>
</tr>
<tr>
<td align="left" valign="top"><em>0</em></td>
<td align="left" valign="top">This user profile will no longer have a GID.</td>
</tr>
</table>
<br>
</dd>
<dt><strong>Error code</strong></dt>
<dd>I/O; CHAR(*)
<p>The structure in which to return error information. For the format of the
structure, see <a href="../apiref/error.htm#hdrerrcod">Error Code Parameter</a>.</p>
</dd>
</dl>
<br>
<h3>Error Messages</h3>
<table cellpadding="5">
<!-- cols="15 85" -->
<tr>
<th align="left" valign="top">Message ID</th>
<th align="left" valign="top">Error Message Text</th>
</tr>
<tr>
<td width="15%" valign="top">CPFA1C8 D</td>
<td width="85%" valign="top">Error occurred while attempting to change the UID
or GID information.</td>
</tr>
<tr>
<td align="left" valign="top">CPF22CE E</td>
<td align="left" valign="top">The &amp;1 value &amp;2 is used by another user
profile.</td>
</tr>
<tr>
<td align="left" valign="top">CPF22DB E</td>
<td align="left" valign="top">The user profile being changed must have a
GID.</td>
</tr>
<tr>
<td align="left" valign="top">CPF22DE E</td>
<td align="left" valign="top">Not allowed to change the UID or GID of user
profile &amp;1.</td>
</tr>
<tr>
<td align="left" valign="top">CPF2203 E</td>
<td align="left" valign="top">User profile &amp;1 not correct.</td>
</tr>
<tr>
<td align="left" valign="top">CPF2204 E</td>
<td align="left" valign="top">User profile &amp;1 not found.</td>
</tr>
<tr>
<td align="left" valign="top">CPF2213 E</td>
<td align="left" valign="top">Not able to allocate user profile &amp;1.</td>
</tr>
<tr>
<td align="left" valign="top">CPF222E E</td>
<td align="left" valign="top">&amp;1 special authority is required.</td>
</tr>
<tr>
<td align="left" valign="top">CPF2225 E</td>
<td align="left" valign="top">Not able to allocate internal system object.</td>
</tr>
<tr>
<td align="left" valign="top">CPF224B E</td>
<td align="left" valign="top">&amp;1 value is not valid.</td>
</tr>
<tr>
<td align="left" valign="top">CPF224C E</td>
<td align="left" valign="top">Cannot change the UID value for QSECOFR.</td>
</tr>
<tr>
<td align="left" valign="top">CPF224D E</td>
<td align="left" valign="top">User profile &amp;1 cannot have a GID.</td>
</tr>
<tr>
<td align="left" valign="top">CPF3CF1 E</td>
<td align="left" valign="top">Error code parameter not valid.</td>
</tr>
<tr>
<td align="left" valign="top">CPF3C90 E</td>
<td align="left" valign="top">Literal value cannot be changed.</td>
</tr>
<tr>
<td align="left" valign="top">CPF9872 E</td>
<td align="left" valign="top">Program or service program &amp;1 in library
&amp;2 ended. Reason code &amp;3.</td>
</tr>
</table>
<br>
<hr>
API introduced: V2R3
<hr>
<center>
<table cellpadding="2" cellspacing="2">
<tr align="center">
<td valign="middle" align="center"><a href="#Top_Of_Page">Top</a> | <a href=
"sec.htm">Security APIs</a> | <a href="aplist.htm">APIs by category</a></td>
</tr>
</table>
</center>
</body>
</html>