Portal 6.3 - Adding Access List Service to all Users

I figured out how to add the Access List Service to an individual user. However, I have 3000+ users and want them all to have this service as well as new accounts that are created dynamically.How do I achieve this?
[235 byte] By [Tasrac] at [2007-11-25 19:05:38]
# 1

In Portal 6.2, you add the service "srapGatewayAccessService" for the Required Services attribute in the Administrator service. This will add the Access List service to users dynamically created.

To add it to the 3000+ existing users, create an XML file with those users and use the dpadmin tool to load in the LDAP.

Steve

wiggam at 2007-7-3 22:58:27 > top of Java-index,Web & Directory Servers,Portal Servers...
# 2

Thanks Steve.

I did the first part as you said and it is now adding the service to dynamically created users. Thanks.

I am not sure on how to use the amadmin tool to load users who are already in there. If I try createuser in the xml file it obviously fails. What do I need to do?

Robert

Tasrac at 2007-7-3 22:58:27 > top of Java-index,Web & Directory Servers,Portal Servers...
# 3
Registering services to many users is documented in: http://docs.sun.com/source/817-7649/prog_service.html#wp34525
jeanLouisLiagre at 2007-7-3 22:58:27 > top of Java-index,Web & Directory Servers,Portal Servers...
# 4
I've read the doc but I didn't understand how can I register the service to many user. Should I build an xml with all the DN of the user I want to modify ?Thanx
canepaf at 2007-7-3 22:58:27 > top of Java-index,Web & Directory Servers,Portal Servers...
# 5

I had a similar problem and did it this way:

ldapsearch -D "cn=Directory Manager" -b "YOUR_ORG_DN" -L "(uid=*)" dn > portaluser.ldif

Now you should have a file with all portal users.

The C++ code below creates the xml that is needed for the bulk action.

Compile it with g++ or any compiler you want. The generated xml is based on userRegisterServiceRequests.xml

which can be found in /INSTALL_DIR/SUNWam/samples/admin/cli/bulk-ops

Now you have to use the amadmin command to process the xml

/opt/SUNWam/bin/amadmin -u "amAdmin" --password "PASSWORD" --verbose --data /PATH/addNetletService.xml

hth

Chris

- C++ Code -

#include <fstream>

#include <string>

using namespace std;

const char* HEADER = "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n"

"<!--\n"

"Copyright (c) 2004 Sun Microsystems, Inc. All rights reserved\n"

"Use is subject to license terms.\n"

"-->\n\n"

"<!DOCTYPE Requests\n"

"PUBLIC \"-//iPlanet//Sun Java System Identity Server 2004Q2 Admin CLI DTD//EN\"\n"

" \"jar://com/iplanet/am/admin/cli/amAdmin.dtd\"\n"

">\n\n"

"<Requests>\n";

const char* REQUEST_BEGIN = " <UserRequests DN=\"";

const char* REQUEST_END = "\">\n"

"<RegisterServices>\n"

"<Service_Name>srapGatewayAccessService</Service_Name>\n"

"</RegisterServices>\n"

" </UserRequests>\n";

const char* FOOTER = "</Requests>";

int main()

{

ifstream in("portaluser.ldif");

ofstream out("addNetletService.xml");

string line;

out << HEADER;

while (getline(in, line))

{

if (line.length() > 0)

{

line = line.substr(4, line.max_size());

out << REQUEST_BEGIN << line << REQUEST_END;

}

}

out << FOOTER;

}

- C++ Code -

CRabel at 2007-7-3 22:58:27 > top of Java-index,Web & Directory Servers,Portal Servers...
# 6
Thanx a lot! I've was tring to do something similar using java and JNDI accessing directly the ldap server.I will try your solution
canepaf at 2007-7-3 22:58:27 > top of Java-index,Web & Directory Servers,Portal Servers...