Creating users in OID (Oracle Internet Directory) – Oracle Collabsuite 10g

Introduction:
This post is regarding creation of users in central OID (Oracle Internet Directory) instance. We call it a central because of its architecture. Usually for any business setup, there will be many instances of application and a single installation of OCS or Oracle AS. Either of these techstack is having OID as one of the component. So the users of all the instances are basically registered in this central OID instance.
So here we will see, how to create users in OID. We can create users either through UI or through command line API. We will see both the methods here.

Creating users using UI:
Navigate to the OID self service console, the URL will be in the form as given below.
http://(hostname):(infra-http-port)/oiddas
Example:
http://ap6059rt.us.oracle.com:7779/oiddas
1) Click on the right hand top corner to login
1a.jpg
2) use the super user ID having all privileges to create a user. In my case its orcladmin
22.jpg
3) Once you login, click on directory tab and then click on create button
3a.jpg
4) First screen will ask for general information. Here you need to enter password for user.
42.jpg
5) You can provision the various component for this user. Example in case of mail, if its provisioned, then by default a mail account will be created for user.
52.jpg
 

6) On third screen, you can check the information and also keep the default information as it is. You can also decide the quota for mail server.
62.jpg
7) Review screen. You can review and finish
If you search for the user you created you should be able to see the record.
72.jpg
Creating users using command line
You can use the following command for creating users from command line.
These commands needs to be run on the host where the OID is installed. Also make sure to source the environment before creating the user.
Example:
ORACLE_HOME=/slot03/oracle/product/ocs10g/infra
TNS_ADMIN=$ORACLE_HOME/network/admin
ORACLE_SID=ocs10g
PATH=$ORACLE_HOME/bin:$PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
export ORACLE_HOME TNS_ADMIN ORACLE_SID PATH LD_LIBRARY_PATH

Creating a user:
1. Create an ldif file called orcl.ldif that includes the following content:
      dn: cn=orcladmin, User_Search_Base
changetype: add
uid: orcladmin
mail: orcladmin
givenName: orcladmin
cn: orcladmin
sn: orclAdmin
description: Seed administrative user for subscriber.
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: inetorgperson
objectClass: orcluser
objectClass: orcluserV2

Example:
      cn=avdeo,cn=users,dc=us,dc=oracle,dc=com
objectclass=top
objectclass=person
objectclass=inetorgperson
objectclass=organizationalperson
objectclass=orcluser
objectclass=orcluserv2
objectclass=ctCalUser
objectclass=orclUserProvStatus
givenname=Advait
sn=Deo
orcltimezone=Asia/Calcutta
mail=advait.deo@us.oracle.com
uid=avdeo
orclactivestartdate=20080310000000z
cn=avdeo
orclisenabled=ENABLED

2. Execute the following command (the following command is one continuous line):
ldapadd -h OID_host -p non-SSL_port -D OID_superuser -w OID_superuser_password -v -f orcl.ldif
Example:
ldapadd -p 389 -h ap6059rt -D “cn=orcladmin” -w “welcome1″ -v -f test.ldif
sh-2.05b$ ldapadd -p 389 -h ap6059rt -D “cn=orcladmin” -w “welcome1″ -v -f test.ldif
do modify ****
add objectclass:
top
person
inetorgperson
organizationalperson
orcluser
orcluserv2
ctCalUser
orclUserProvStatus
add givenname:
Advait
add sn:
Deo
add orcltimezone:
Asia/Calcutta
add mail:
advait.deo@us.oracle.com
add uid:
avdeo
add orclactivestartdate:
20080310000000z
add cn:
avdeo
add orclisenabled:
ENABLED
adding new entry cn=avdeo,cn=users,dc=us,dc=oracle,dc=com
modify complete

Searching for the user:
ldapsearch uid=avdeo
sh-2.05b$ ldapsearch uid=avdeo
cn=avdeo,cn=users,dc=us,dc=oracle,dc=com
objectclass=top
objectclass=person
objectclass=inetorgperson
objectclass=organizationalperson
objectclass=orcluser
objectclass=orcluserv2
objectclass=ctCalUser
objectclass=orclUserProvStatus
givenname=Advait
sn=Deo
orcltimezone=Asia/Calcutta
mail=advait.deo@us.oracle.com
uid=avdeo
orclactivestartdate=20080310000000z
cn=avdeo
orclisenabled=ENABLED

Deleting users from LDAP:
ldapdelete -p non-SSL_port -h OID_host -D OID_superuser -w OID_superuser_password username

More Here


Courtesy:http://avdeo.com/2008/03/11/creating-users-in-oid-oracle-internet-directory-oracle-collabsuite-10g/