Previous Contents Index Next |
iPlanet Portal Server Reference Guide |
Chapter 8 Using the Command Line Interface
Command Line Inferface Overview
This chapter describes the command-line interface (ipsadmin) available for iPlanet Portal Server administration. Use ipsadmin to import XML files to register (or update) iPlanet Portal Server applications or content providers.
How it Works
As iPlanet Portal Server is installed, XML files shipped with the product are imported into the Profile and Policy Server (using ipsadmin) to register the existing applications. See /etc/opt/SUNWips/xml to see the XML code used.If new applications are written that should be administered through the iPlanet Portal Server desktop or if expanding on the capabilities of existing modules, it is necessary to write and import an XML file to register the module with the Profile and Policy Server. Additionally, use the ipsadmin command to script or automate most routine tasks that could otherwise be accomplished through the Administration Console. For example:
ipsadmin Command
By providing additional or new information to the Profile and Policy Server, the ipsadmin command allows the creation or modification of:
Usage
ipsadmin [-import|-chkxml] xmlfileipsadmin [change] [role|user|domain|component] name [xmlfile]
ipsadmin [get|delete][role|user|domain|component] name
-import imports the xmlfile as a new component in the Profile service.
-chkxml checks the validity of the XML and reports errors without making any changes to the Profile. Use this before importing any data.
xmlfile comprises component name, attributes, and privileges as per the webtopimport.dtd file. See Code Example 8-1 for the DTD and annotations.
create, get, change, delete are operations that can be performed on a profile.
name is the name of the profile to be operated on.
role, user, domain, component are the types of the profile to be operated on.
file is the XML file containing the contents for the operation with regard to attributes and privileges. This uses the iwt:Att and iwtPriv tags in the wtimport.dtd file.
Create a file newComponent.xml which describes what the Profile Server must know about the component:
<iwt:Component name="newComponent"
<iwt:Att name="newComponent-attribute1"
</iwt:Att>
List as many other attributes as you require.
<iwt:Priv name="newComponent-privilege1"
</iwt:Att>
Issue the ipsadmin command:
# ipsadmin -import newComponent.xml
Create an XML file which contains attributes and privileges for this Domain.
This XML file looks like the XML in the Importing a New Component"example, except that it does not have the enclosing <iwt:Component> tags and it could have attributes and privileges from any of the components currently imported. It contains <iwt:Att and <iwt:Priv tags only.
Create an XML file which contains attributes and privileges for this role (Employee, in this example).
This XML file looks like the XML in the Importing a New Component"example, except that it does not have the enclosing <iwt:Component> tags and it could have attributes and privileges from any of the components currently imported. It contains <iwt:Att and <iwt:Priv tags only.
Creating a New User and Assigning a Role
Create an XML file which contains attributes and privileges for this user.
This XML file looks like the XML in the Importing a New Component" example, except that it does not have the enclosing <iwt:Component> tags and it could have attributes and privileges from any of the components currently imported. It contains <iwt:Att and <iwt:Priv tags, plus these tags:<iwt:Att name="iwtUser-role" >
<Val>/Sampledomain/Employee</Val>
If the role attribute is omitted, ipsadmin will create the user, but issue a warning that the role is not set. If that happens, the role can always be added later using the ipsadmin change command.
Reading (Getting) a Profile
Use ipsadmin to read information out of the Profile Server, to more easily update specific information or to modify the extracted information to create a similar, new entry.
# ipsadmin get domain SampleDomain
# ipsadmin get component newComponent
# ipsadmin get role /SampleDomain/Employee
# ipsadmin get user /SampleDomain/decoyAll display the attributes and privileges on stdout via the <iwt:Att and <iwt:Priv tags. The output can be saved in a file and later used for updating or creating another profile.
Changing a Profile
Use ipsadmin to modify existing Profile entries by specifying change on the command line as well as the type of component that the XML specifies to change.Here is an example on how to modify a user's first name and last name, assume the user is user1 under domain dom1.
Create an XML file named /tmp/user.xml which contains following tags:
The attributes name for user's first name and last name are:
<iwt:Att name="iwtUserInfoProvider-firstName"> <iwt:Att name="iwtUserInfoProvider-lastName">
All the iPlanet Portal Server defined attributes and privileges could be find in the XML files under /etc/opt/SUNWips/xml directory.
The XML specifies what needs to be changed and values enclosed within the iwt:Att and iwt:Priv tags.
Deleting a Profile
Use ipsadmin to delete existing Profile entries by specifying delete on the command line. For example:
# ipsadmin delete user /SampleDomain/decoy
# ipsadmin delete role /SUN/Employee
# ipsadmin delete domain SUN
# ipsadmin delete component newComponent
Previous Contents Index Next
Copyright © 2000 Sun Microsystems, Inc. Some preexisting portions Copyright © 2000 Netscape Communications Corp. All rights reserved.
Last Updated May 04, 2000