The Db2 Setup wizard creates these users and groups for you during
the installation process. If you want, you can create them ahead of time.
Before you begin
To complete 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 that are 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 are 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 |
- The instance owner home directory is where the Db2 instance is created.
- The fenced user is used to run user-defined functions (UDFs) and stored procedures outside of
the address space that is used by the Db2 database.
- The user ID for the Db2 administration server
user is used to run the Db2 administration server
on your system.
Procedure
To create the required groups and user IDs for Db2 database
systems:
- Log in as a user with root user authority.
- 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
- 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