idsadduser

Use the idsadduser command to create a user account on an operating system.

Description

The idsadduser command creates an operating system user with attributes that meet the requirements of a directory server instance owner. The idsadduser command can be run by a root user only on UNIX or a member of the Administrators group on Windows.

Note:
  • If you create a user with the name of an existing user by using idsadduser, a message is shown indicating that the user exists. In such case, you can choose to overwrite an existing user with modified properties or exit.
  • On Windows 2008, idsadduser adds the instance owner in the default DB2® security groups DB2ADMNS and DB2USERS.

Synopsis

 idsadduser [–u username [-w password] [ –l homedir ] –g groupname] 
            [-d debuglevel] [-b outputfile] [-q] [-n]] | -v | -?

Options

-b outputfile
Specifies a file with full path to redirect output. If you use this parameter with the -q parameter, error messages are sent to the outputfile file. If the debug mode is on, debug output is also sent to this file.
-d debuglevel
Sets the debug level. The ldtrc command must be running, when you use this parameter.
-g groupname
Specifies the primary group of the user. This parameter is valid only on AIX®, Linux®, and Solaris systems.
-l homedir
Specify the home directory of the user. The default value for the home directory on AIX and Linux is /home/username. On Solaris, the default value for the home directory is /export/home/username. This parameter is valid only on AIX, Linux, and Solaris systems.
-n
Specifies to run in no-prompt mode. All output is generated except for the messages that require user interaction. The -w parameter must be used with the -n parameter.
-q
Specifies to run in quiet mode. All output except error is suppressed. If the -d parameter is also specified, then the trace output is not suppressed.
-u username
Specifies the user name to create on the operating system.
-v
Prints the version information of the command.
-?
Specifies to show the syntax help.

Examples

Example 1:
To create a user on a UNIX system with the user details, run the idsadduser command.
  • User name: inst1
  • Primary group: staff
  • Home directory: /home/inst1
  • Password: inst123
idsadduser –u inst1 –g staff –l /home/inst1 –w inst123
Example 2:
To provide password that is not visible as clear text on the command prompt, run the idsadduser command of the following format:
idsadduser –u inst1 –g staff –l /home/inst1
After you run the command, the command prompts you to enter the password.
Example 3:
To create a user on Windows, run the idsadduser command of the following format:
idsadduser –u inst1 –w inst123