The following procedure provisions a Developer Sample user, dsuser1, using an XML input file to first create a user entry and then another input file to specify portal services for the user entry. Multiple users can be created by using this same procedure.
Create a new user entry for dsuser1.
Create an XML file that specifies the basic user attributes.
An example CreateUserRequest.xml file follows:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved
Use is subject to license terms.
-->
<!DOCTYPE Requests
PUBLIC "-//iPlanet//Sun Java System Access Manager 2005Q4 Admin CLI DTD//EN"
"jar://com/iplanet/am/admin/cli/amAdmin.dtd"
>
<!-- CREATE REQUESTS -->
<Requests>
<PeopleContainerRequests DN="ou=People,o=DeveloperSample,dc=pstest,dc=com">
<CreateUser createDN="dsuser1">
<AttributeValuePair>
<Attribute name="cn"/>
<Value>dsuser1</Value>
</AttributeValuePair>
<AttributeValuePair>
<Attribute name="sn"/>
<Value>dsuser1</Value>
</AttributeValuePair>
<AttributeValuePair>
<Attribute name="userPassword"/>
<Value>dsuser1</Value>
</AttributeValuePair>
</CreateUser>
</PeopleContainerRequests>
</Requests>
Run the amadmin command with CreateUserRequest.xml as an input file.
# /opt/SUNWam/bin/amadmin -u amadmin -w password -t CreateUserRequest.xml
The output should resemble the following:
PeopleContainer: ou=People,o=DeveloperSample,dc=pstest,dc=com Create Users: uid=dsuser1,ou=People,o=DeveloperSample,dc=pstest,dc=com Success 0: Successfully completed. |
Add portal services to the dsuser1 entry.
Create an XML file that specifies the portal services to add.
An example AddUserServeice.xml file follows:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved
Use is subject to license terms.
-->
<!DOCTYPE Requests
PUBLIC "-//iPlanet//Sun Java System Access Manager 2005Q4 Admin CLI DTD//EN"
"jar://com/iplanet/am/admin/cli/amAdmin.dtd"
>
<!-- USER REQUESTS -->
<Requests>
<UserRequests DN="uid=dsuser1,ou=People,o=DeveloperSample,dc=pstest,dc=com">
<RegisterServices>
<Service_Name>sunportalnetletservice </Service_Name>
<Service_Name>sunportalproxyletservice </Service_Name>
<Service_Name>sunportalgatewayaccessservice </Service_Name>
<Service_Name>sunportalportal1desktopservice </Service_Name>
<Service_Name>iplanet-am-auth-configuration-service </Service_Name>
</RegisterServices>
</UserRequests>
</Requests>
This input file adds the following portal services:
Proxylet
Access List
portal Desktop
Authentication Configuration
Netlet
Run the amadmin command with AddeUserServices.xml as an input file.
# /opt/SUNWam/bin/amadmin -u amadmin -w password -t AddUserServices.xml
The output should resemble the following:
User: uid=dsuser1,ou=People,o=DeveloperSample,dc=pstest,dc=com Registered services: sunportalproxyletservice ... sunportalnetletservice Success 0: Successfully completed. |