1.10.1 Changing User IDs and Group IDs for dbmsrv

You can change the user ID and group ID of the dbmsrv service users if there are conflicts with the default values. For example, if you are using LDAP or if you are using session management tools that require different values from the default values.

Starting with Oracle Exadata System Software releases 18.1.12 and 19.1.2, you can use the migrate_ids.sh utility to change the user and group IDs for the dbmsrv users. Note the following:

  • The migrate_ids.sh utility is located at /opt/oracle.SupportTools and should be run by the root operating system user.

  • Before you change a user ID or group ID for a dbmsrv user, you must stop all running processes associated with any user or group you want to change. Otherwise, the migration utility fails.

  • The migrate_ids.sh utility is only intended to change the user and group IDs for the dbmsrv users. Do not use the utility to modify the user and group IDs for other Oracle products.

The migrate_ids.sh utility has the following syntax and options:

migrate_ids.sh [ -uid username new_uid ] 
               [ -gid group_name new_group_id ] 
               [ --uid-file uid_file ] 
               [ --gid-file gid_file ] 
               [ -skipdirs directory_path [ ,directory_path  ]] 
  • -uid: Specifies a user name and new UID for user ID migration.

  • -gid: Specifies a group name and new GID for group ID migration.

  • --uid-file: Specifies a file containing user name and UID pairs for user ID migration.

    Each line in the file must contain a unique user name and must contain the format:

    <user_name> <new_UID>

    This option is first available in Oracle Exadata System Software release 24.1.0.

  • --gid-file: Specifies a file containing group name and GID pairs for group ID migration.

    Each line in the file must contain a unique group name and must contain the format:

    <group_name> <new_GID>

    This option is first available in Oracle Exadata System Software release 24.1.0.

  • -skipdirs: Specify a list of absolute paths of directories to skip during the user or group ID migration.

    This option can be useful if you have large NFS directories that you want to skip to make the migration faster. However, if there are files in the directories being skipped that use the IDs being migrated, then those files are not updated. It is your responsibility to make sure that the directories being skipped with this option do not contain such files to ensure successful migration of the IDs.

Example 1-4 Migrate the dbmadmin user to a new user ID

This example shows how to migrate only the uid of user dbmadmin to 3001.

# migrate_ids.sh -uid dbmadmin 3001

Example 1-5 Migrate the dbmusers group to a new group ID

This example shows how to migrate only the gid of group dbmusers to 4001.

# migrate_ids.sh -gid dbmusers 4001

Example 1-6 Migrate all dbmsrv users and groups to new values

This example shows how to migrate all the user and group IDs for dbmsrv to new values.

# migrate_ids.sh -uid dbmsvc 3001 -gid dbmsvc 4001
# migrate_ids.sh -uid dbmadmin 3002 -gid dbmadmin 4002
# migrate_ids.sh -uid dbmmonitor 3003 -gid dbmmonitor 4003
# migrate_ids.sh -gid dbmusers 4004

Example 1-7 Migrate all dbmsrv users and groups to new values using input files

This example shows how to migrate all the user and group IDs for dbmsrv to new values using input files to specify the new user IDs and group IDs.

This example is functionally equivalent to the previous example, but the migration is performed by running the migrate_ids.sh utility only once.

# cat uidfile
dbmsvc 3001
dbmadmin 3002
dbmmonitor 3003
# cat gidfile
dbmsvc 4001
dbmadmin 4002
dbmmonitor 4003
dbmusers 4004
# migrate_ids.sh --uid-file uidfile --gid-file gidfile

Example 1-8 Migrate a user ID while skipping directories

This example shows how to migrate the user ID of user dbmadmin to 3001 while not searching the files in the /proc or /sys directories.

# migrate_ids.sh -uid dbmadmin 3001 -skipdirs /proc,/sys