DB2 10.5 for Linux, UNIX, and Windows

Creating group and user IDs for a DB2 database installation (Linux and UNIX)

The DB2 Setup wizard will create these users and groups for you during the installation process. If you want, you can create them ahead of time.

Before you begin

To perform this task, you must have root user authority to create users and groups.

About this task

Three users and groups are required.

The user and group names used in the following instructions are documented in the following table. You can specify your own user and group names if they adhere to system naming rules and DB2® naming rules.

The user IDs you create will be required to complete subsequent setup tasks.

Table 1. Default users and groups
User Example user name Example group name
Instance owner db2inst1 db2iadm1
Fenced user db2fenc1 db2fsdm1
DB2 administration server user dasusr1 dasadm1

Procedure

To create the required groups and user IDs for DB2 database systems:

  1. Log in as a user with root user authority.
  2. Enter the appropriate commands for your operating system.
    Note: These command line examples do not contain passwords. They are examples only. You can use the passwd username command from the command line to set the password.
    AIX® operating systems
    To create groups on AIX, enter the following commands:
       mkgroup id=999 db2iadm1
       mkgroup id=998 db2fsdm1
       mkgroup id=997 dasadm1
    Create users for each group:
       mkuser id=1004 pgrp=db2iadm1 groups=db2iadm1 
          home=/home/db2inst1 db2inst1 
       mkuser id=1003 pgrp=db2fsdm1 groups=db2fsdm1 
          home=/home/db2fenc1 db2fenc1 
       mkuser id=1002 pgrp=dasadm1 groups=dasadm1 
          home=/home/dasusr1 dasusr1
    Set initial password:
       passwd db2inst1
       passwd db2fenc1
       passwd dasusr1
    HP-UX operating systems
    To create groups on HP-UX, enter the following commands:
       groupadd -g 999 db2iadm1  
       groupadd -g 998 db2fsdm1  
       groupadd -g 997 dasadm1
    Create users for each group:
    useradd -g db2iadm1 -d /home/db2instl -m db2inst1 
    useradd -g db2fsdm1 -d /home/db2fenc1 -m db2fenc1 
    useradd -g dasadm1 -d /home/dasusr1 -m dasusr1 
    Set initial password:
       passwd db2inst1
       passwd db2fenc1
       passwd dasusr1
    Linux operating systems
    To create groups on Linux operating systems, enter the following commands:
       groupadd -g 999 db2iadm1
       groupadd -g 998 db2fsdm1
       groupadd -g 997 dasadm1
    Create users for each group:
    useradd -u 1004 -g db2iadm1 -m -d /home/db2inst1 db2inst1 
    useradd -u 1003 -g db2fsdm1 -m -d /home/db2fenc1 db2fenc1 
    useradd -u 1002 -g dasadm1 -m -d /home/dasusr1 dasusr1
    Set initial password:
       passwd db2inst1
       passwd db2fenc1
       passwd dasusr1
    Solaris operating systems
    To create groups on Solaris, enter the following commands:
      groupadd -g 999 db2iadm1
      groupadd -g 998 db2fsdm1
      groupadd -g 997 dasadm1
    Create users for each group:
    useradd -g db2iadm1 -u 1004 -d /export/home/db2inst1 -m db2inst1 
    useradd -g db2fsdm1 -u 1003 -d /export/home/db2fenc1 -m db2fenc1 
    useradd -g dasadm1 -u 1002 -d /export/home/dasusr1 -m  dasusr1
    Set initial password:
       passwd db2inst1
       passwd db2fenc1
       passwd dasusr1