Adding user accounts for DB2 on Linux

In the following examples that show creating user accounts, you can use the following options:

Create the user accounts on each node in the cluster.

This example shows how to create the user, db2inst1, who is the DB2 UDB instance owner. The instance's home directory is also the mount point: /db2_mnt/db2inst1. The DB2 UDB instance home directory must exist on every node. For example:

# useradd -g db2iadm1 -u 1004 -d /db2_mnt/db2inst1 -m -s \
/bin/ksh db2inst1

The following examples show how to create user accounts for db2fenc1 and dasusr1. These users' home directories are under /home in the local file system on each node.

# useradd -g db2fadm1 -u 1003 -d /home/db2fenc1 -m -s \
/bin/ksh db2fenc1
# useradd -g dasadm1 -u 1002 -d /home/dasusr1 -m -s /bin/ksh dasusr1

For DB2 configuration in MPP mode the file system that uses the mount point: /db2_mnt/db2inst1 uses Cluster File System to hosts the DB2 UDB instance home directory.