Advanced
- Application Server
|
|
|
|
‘It is easy enough
to be friendly to one's friends. But to be friend the one who
regards himself as your enemy is the quintessence of true
religion. The other is mere business.’ Gandhi |
How
to maintain a user to the OID server under a realm using the command
line tools
(LESSON15)
Assuming
your realm is cn=Users,dc=iselfschooling,dc=com. To add a new user,
you should perform the following steps:
-
vi
a file to create a new file with extension LDIF and name it “myfirstuser.ldif”.
-
Enter the
following into the above created file.
dn: cn=Kazerooni,cn=Users,dc=iselfschooling,dc=com
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetorgperson
objectclass: orcluser
objectclass: orcluserV2
cn: Kazerooni
sn: John
description: My first new user
givename: Kazerooni
mail: help@iselfschooling.com
userpassword: Your-Password
-
Save the file
-
Execute the
ldapadd command to add the new user.
-
$ cd $ORACLE_HOME/bin
-
$ ./ldapadd
–p 3060 myapp.iselfschooling.com –D cn=orcladmin –w passwd –v
–f /u01/oracle/myfirstuser.ldif
-
To
verify that the user was added do the following:
-
./ldapbind
–p 3060 –D cn=Kazerooni,cn=Users,dc=iselfschooling,dc=com –w
Your-Password
-
To
change the password:
-
vi a file and
enter the following lines into myfirstchange.ldif.
dn: cn=Kazerooni,cn=Users,dc=iselfschooling,dc=com
changetype: modify
replace: userpassword
userpassword: newpassword
-
save the file
and execute the ldapmodify command as shown:
-
$ $ORACLE_HOME/bin/.ldapmodify
–p 3060 –h myapp.iselfschooling.com –D cn=orcladmin –w
Your-Password –v –f /u01/oracle/myfirstchange.ldif
-
To
add an attributes to user do the following:
dn: cn=Kazerooni,cn=Users,dc=iselfschooling,dc=com
changetype: modify
add: telephone
telephone: 4326548754
-
Save the
above lines to your-file and execute the ldapmodify command.
-
./ldapmodify
–p 3060 –h myapp.iselfschooling.com –D cn=orcladmin –w your-passwd
–v –f /u01/oracle/your-file
-
To
delete a user do the following:
-
./ldapdelete –p
3060 –h myapp.iselfschooling.com –D “cn=orcladmin” -w your-passwd
“cn=Kazerooni,cn=Users,dc=iselfschooling,dc=com”
To
create a user by using ODM, open ODM, and connect to OID server with
the username orcladmin and the password your-password.
Expand
the Entry Management> dc=com> dc=iselfschooling> dc=Users.
Then select the cn=PUBLIC node under cn=Users. Right click to view the
pop-up menu and click on the “Create Like” option from the pop-up
menu to create a new user.
|