My environment details:
Hostname: oidoam.tap
OID Port: 389
Root user: orcladmin
Password: abc123
New user to be created: qasim
Step 1: First of all from the ORACLE_HOME/bin execute following command.
$ ldapsearch -h oidoam.tap -p 389 -D "cn=orcladmin" -w abc123 "uniquemember=cn=orcladmin,cn=Users,dc=tap,dc=com" "dn" > '/tmp/group.ldif'
This command will create an ourput file group.ldif in /tmp.
Sample group.ldif output:
cn=OracleContextAdmins,cn=Groups,cn=OracleContext,dc=tap,dc=com
cn=OracleUserSecurityAdmins,cn=Groups,cn=OracleContext,dc=tap,dc=com
cn=iASAdmins, cn=Groups,cn=OracleContext,dc=tap,dc=com
cn=UserProxyPrivilege, cn=Groups,cn=OracleContext,dc=tap,dc=com
cn=OracleDASAdminGroup, cn=Groups,cn=OracleContext,dc=tap,dc=com
cn=OracleSuperUserAdminGroup, cn=Groups, cn=OracleContext,dc=tap,dc=com
cn=ASPAdmins, cn=groups,cn=OracleContext,dc=tap,dc=com
cn=IAS & User Mgmt Application Admins, cn=Groups,cn=OracleContext,dc=tap,dc=com
cn=Trusted Applications Admins, cn=Groups,cn=OracleContext,dc=tap,dc=com
Step 2.
Edit the group.ldif file to following format:
dn: cn=OracleContextAdmins,cn=Groups,cn=OracleContext,dc=tap,dc=com
changetype: modify
add: uniquemember
uniquemember: cn=qasim,cn=Users,dc=tap,dc=com
dn: cn=OracleUserSecurityAdmins,cn=Groups,cn=OracleContext,dc=tap,dc=com
changetype: modify
add: uniquemember
uniquemember: cn=qasim,cn=Users,dc=tap,dc=com
dn: cn=iASAdmins, cn=Groups,cn=OracleContext,dc=tap,dc=com
changetype: modify
add: uniquemember
uniquemember: cn=qasim,cn=Users,dc=tap,dc=com
dn: cn=UserProxyPrivilege, cn=Groups,cn=OracleContext,dc=tap,dc=com
changetype: modify
add: uniquemember
uniquemember: cn=qasim,cn=Users,dc=tap,dc=com
dn: cn=OracleDASAdminGroup, cn=Groups,cn=OracleContext,dc=tap,dc=com
changetype: modify
add: uniquemember
uniquemember: cn=qasim,cn=Users,dc=tap,dc=com
dn: cn=OracleSuperUserAdminGroup, cn=Groups, cn=OracleContext,dc=tap,dc=com
changetype: modify
add: uniquemember
uniquemember: cn=qasim,cn=Users,dc=tap,dc=com
dn: cn=ASPAdmins, cn=groups,cn=OracleContext,dc=tap,dc=com
changetype: modify
add: uniquemember
uniquemember: cn=qasim,cn=Users,dc=tap,dc=com
dn: cn=IAS & User Mgmt Application Admins, cn=Groups,cn=OracleContext,dc=tap,dc=com
changetype: modify
add: uniquemember
uniquemember: cn=qasim,cn=Users,dc=tap,dc=com
dn: cn=Trusted Applications Admins, cn=Groups,cn=OracleContext,dc=tap,dc=com
changetype: modify
add: uniquemember
uniquemember: cn=qasim,cn=Users,dc=tap,dc=com
dn: cn=Common User Attributes, cn=Groups,cn=OracleContext,dc=tap,dc=com
changetype: modify
add: uniquemember
uniquemember: cn=qasim,cn=Users,dc=tap,dc=com
dn: cn=Common Group Attributes, cn=Groups,cn=OracleContext,dc=tap,dc=com
changetype: modify
add: uniquemember
uniquemember: cn=qasim,cn=Users,dc=tap,dc=com
Step 4:
Save the group.ldif file and execute the following command:
$ ldapmodify -h oidoam.tap -p 389 -D "cn=orcladmin" -w abc123 -f '/tmp/group.ldif'
To confirm if the user has been really created, kindly execute the below command:
$ ldapsearch -h oidoam.tap -p 389 -D "cn=orcladmin" -w abc123 "uniquemember=cn=qasim,cn=Users,dc=tap,dc=com" "dn"