Programmatically creating users
How can I bulk create users in Portal 8.1?
Any sample code would help.
Thanks
Mike
Hi Martin,
Can you pls forward me the sample code? It would be great.
Thanks
S.Suganya
"Martin Porter" <[email protected]> wrote:
>
>
A quick and simple way to do this is to create a pageflow with a JSP
that takes
a file of the usernames and passwords. Add an action from the jsp (button
or whatever).
Drag the Portal EJB User Manager control into the action view. Then read
all your
data from the file and in the loop just call the createUser() method.
We used this to bulk load users to our WLS Embedded LDAP domain and the
Portal
DB and it worked fine....
userManager.createUser(username,password);
Can email you the sample code off line.
Hope it helps
Martin
"Mike Milkani" <[email protected]> wrote:
How can I bulk create users in Portal 8.1?
Any sample code would help.
Thanks
Mike
Similar Messages
-
Programatically Creating User in wls 12.1.2 embedded LDAP
Is it possible to programmatically create users in WLS emdebbed LDAP? Can you please point me to any API or examples in documentation that does something similar?
I am using WLS 12.1.2.0.0
Thanksyou can find some samples in java2s.com
you can connect to wls embedded ldap in the following way.. once u connect u can create users in the ldap directly.. make sure u create users in master ldap
http://weblogic-wonders.com/weblogic/2010/05/20/connecting-to-weblogic-server-embedded-ldap-using-ldap-browser/
hope this help!
Thanks,
Faisal -
How to create User Portal in OID programmatically in JSP
Hi.
I want to create User Portal programmatically in JSP (if posible) or have to use procedure.
I check with package wwsec_api, it just have 'function
add_portal_user', but it say we must have "the user must already exist in OID before this function is called."
So, i checked for 'how to create User in OID'. What i got (in metalink)just methods that 'Create manually Portal Users in to OID' by LDAP or PL/SQL coding (with list of user in flat files).
What i want to do is, How to create User POrtal in OID by JSP? What are the procedure/table/method involved?
Do anybody have any samples?..
Thanks.I had to write my own because I could not find one anywhere. Here is an addUser() method that seems to work pretty well.
import oracle.ldap.util.jndi.ConnectionUtil;
import javax.naming.directory.*;
import javax.naming.*;
public class LdapUser
public LdapUser(){}
public void addUser(String pUsername, String pPassword, String pFirstName, String pLastName, String pEmail)
try
InitialDirContext ctx = ConnectionUtil.getDefaultDirCtx("host", "port", "orcladmin", "pwd");
BasicAttributes attrs = new BasicAttributes();
BasicAttribute oc = new BasicAttribute("objectclass");
oc.add("top");
oc.add("person");
oc.add("inetOrgPerson");
oc.add("organizationalPerson");
oc.add("orclUser");
oc.add("orclUserV2");
attrs.put(oc);
BasicAttribute gn = new BasicAttribute("givenName", pFirstName);
attrs.put(gn);
BasicAttribute sn = new BasicAttribute("sn", pLastName);
attrs.put(sn);
BasicAttribute cn = new BasicAttribute("mail", pEmail);
attrs.put(cn);
BasicAttribute pwd = new BasicAttribute("userpassword", pPassword);
attrs.put(pwd);
// Etcetera, etcetera...
ctx.createSubcontext("cn="+pUsername+",cn=users,dc=whatever,dc=com", attrs);
ctx.close();
System.out.println("Success!!");
catch (NameAlreadyBoundException nabe)
System.out.println("Username is already in use. Please choose another.");
catch (NamingException ne)
System.out.println("NamingException: " + ne);
catch (Exception e)
System.out.println("User account was not created.");
} -
Programmatically creating Oracle Applications users and groups....
Hi,
does anybody know of a way for programmatically creating Oracle Applications users and groups....
--Arvind AshtekarSo my question is still unanswered:
1)I want to add users programmatically. Can I use apps.fnd_user_pkg to do this.If I am using MS Active Directory Single sign on
2) Are you sure it is supported ny Oracle. If yes, Can you give me the link supporting this.
Can you add my name to ur yahoo chat friends My id is arvind_ashtekar2001
I need urgent help.
I am getting login pag not found error for e-buz home page. iAS Server is runnung fine.(One more thing setup is failed after 100% installation. I mean it did once more system check and the error was jsp not resonding. And no action after that just sinply close that message windoe and manually close setup dialog)
What might me the error.
Thanks
--Arvind Ashtekar -
Steps Involved in creating Users thru the API
Hi Mark or anybody from Oracle,
Your solution to build a string for the
XML and then parse it is ok. However I would
like to do it programmatically instead of building strings containing the XML.
What are the steps and exactly what attributes do you need to set for the User
to be created programmatically.
Here is the steps I have and It's giving me
the following exception: IFS-30002 - Unable to create new library object.
The objects needed to create a user are:
1) DirectoryUserDef + set its attributes
2) Folder Definition for User folder then add
to parent folder in this case /home
3) PrimaryProfileUserDefinition + set its attributes DirectoryUser and HomeFolder ?
Can you elaborate on the exact steps to take
and exact attributes to set.
Thanks
null#1 I would strongly recommend the XML based approach. It's much easier, and if we change the way the user / directory objects are organized in much less likely to require you to alter your code.
Note that in order to create the objects programatically you're going to have to make sure that you have set ACLs and Owners correctly. It really is quite a complex process.
At some later date we 'may' provide a simple Java API for creating users.
In order to understand your error I need to catch the exception and print the stack trace as per the end of my code example for creating a user from an XML string.
Please post the results of the stack trace and someone will attempt to respond to you. -
How to assign the role for created user thru dynpro App
Hi All
How to assign the role for currently created user from Webdynpro App.
when i enter into the portal after creating the user
i am getting the following messgae in the portal
"No portal roles are assigned for this user.If this problem persists, contact your system administrator."
how to assign the user defined role for the created user from dynpro App
Regards
Dhina Kar J
Edited by: Dhinakaran Jeyachandran on Feb 1, 2008 12:19 PM
Edited by: Dhinakaran Jeyachandran on Feb 1, 2008 12:35 PMIn the User Administration section of your portal find your newly created user and below select "Assigned Roles" tab then press <Modify> button and look through available roles on portal then just simply add and save. But if you want to do it programmatically see below:
IUserAcountFactory userFactory = UMFactory.getUserAccountFactory();
// IUser - read only but with IUserAccount is possible to set up user data
IUserAccountSearchFilter userFilter = userFactory.getUserAccountSearchFilter();
userFilter.setLogonUid("superuser", ISearchAttribute.LIKE_OPERATOR, false);
ISearchResult sr = userFactory.search(userFilter);
for (final Iterator i = new PrincipalIterator(sr); i.hasNext();) {
IUserAccount user = (IUserAccount) i.next();
Execute the same search for IRole (or IGroup if needed) get the unique id of them and use newRole(...) and addUserToRole(...) methods from IRoleFactory.
Of course you don't need search for this principals if you know uniqueness of them. Use appropriate factories to get'em all by this unique id.
All the features see in [javadocs|http://help.sap.com/javadocs/NW04S/current/se/index.html] -
Programmatically create custom attributes in KM
Hi all,
We are implementing an application which uploads/downloads files to/from KM content of a portal user. The application will also display the list of files for the portal user. The file list displays the standard file attributes: filename, created_date, size.
Additionally to these attributes we want to store some custom attributes (e.g. last sent to, received from...) for files in the KM.
We need to create these custom attributes programmatically at runtime, if the file is stored/updated in the KM content.
How can we programmatically create these kind of custom attributes in KM and read/write these custom attributes at runtime?
Thanks,
Yasarhi,
General example on how to code KM
http://wiki.sdn.sap.com/wiki/display/Snippets/UpdateKnowledgeManagementusingWebDynproJavaApplication
Coding custom attributes, look into Properties section
https://media.sdn.sap.com/html/submitted_docs/nw_kmc/howto/rf/client_api/rf_client_api.html
Coding custom renderer.
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f7b176eb-0701-0010-2b84-8edb1f76771d?QuickLink=index&overridelayout=true
Srini -
Creating User account via SQL query
Hi,
Is it possible to create a user account programmatically?
thanks,
DekelIn SQL, use the CREATE USER statement. In PL/SQL, see Re: Creating user in PL/sql procdure.
-
Programmatically creating iBots
We are use OBIEE to display reports on an external-facing site using an IFrame'd Go URL and would like the ability to notify users by email when a certain report contains data based on a user defined thresholded value (e.g., if sales for a particular item go above %200)
Normally this could be done by having the user use Answers to create their own filtered report, have them create an iBot, etc. I was curious if there was a way to programmaticly create the customized reports/iBots of if there was another way of doing this? I'm making the assumption that I'll have to create the UI that takes in the threshold value, which would then be passed on to OBIEE.
thanksI am working on the creating script component programmatically.
The code has been created is shown in the following,
Dim SourceCodeValue(3) As String
Dim scriptPropType As PipeLineWrapper.IDTSComponentMetaData90 = _
CType(CType(dataflowTask, TaskHost).InnerObject, PipeLineWrapper.MainPipe).ComponentMetaDataCollection.New()
scriptPropType.Name = "Transform Property Type"
scriptPropType.ComponentClassID = "{BF01D463-7089-41EE-8F05-0A6DC17CE633}"
scriptPropType.Description = "Transform Property Type"
Dim instance2 As PipeLineWrapper.CManagedComponentWrapper = scriptPropType.Instantiate()
instance2.ProvideComponentProperties()
SourceCodeValue(0) = "dts://Scripts/" & "ScriptComponent_9ddf9eba6f5b488f9710b95e4d7e7c74" & _
"/" & "ScriptComponent_9ddf9eba6f5b488f9710b95e4d7e7c74" & ".vsaproj"
SourceCodeValue(1) = My.Resources.ScriptComponentProjFile
SourceCodeValue(2) = "dts://Scripts/" & "ScriptComponent_9ddf9eba6f5b488f9710b95e4d7e7c74" & _
"/ScriptMain.vsaitem"
SourceCodeValue(3) = My.Resources.ScriptComponentCode
Dim anIDTSDesigntimeComponent90 As Microsoft.SqlServer.Dts.Pipeline.Wrapper.IDTSDesigntimeComponent90 = _
CType(instance2, Microsoft.SqlServer.Dts.Pipeline.Wrapper.IDTSDesigntimeComponent90)
anIDTSDesigntimeComponent90.SetComponentProperty("SourceCode", SourceCodeValue)
anIDTSDesigntimeComponent90.SetComponentProperty("PreCompile", False)
When debugger reach to “anIDTSDesigntimeComponent90.SetComponentProperty("SourceCode", scriptValue)”, NullReferenceException. “Use the “New” keyword to create an object instance” was shown.
Could you please give me some help or suggestion?
Thank you so much in the advance -
How to programmatically add users to WLS 7
Is there a way to programmatically add users to Weblogic 7? I'm building up a website
and want to give my visitors an opportunity to register with the site.
The code samples I found until now are not working
cheers,
michaelHi Guys,
I too am looking for an answer to this very question. I too want
users to be able to register and also be able to control access
to the site based on the roles being assigned. So what I would
like to do is create users and assign them roles so that the
roles defined within web.xml could be used to control access to
various parts of the site.
Regards
Vijesh
"Brian Pontarelli" <[email protected]> wrote:
>
I had the same exact question. I would like to add users programmatically
to the
weblogic server and also programmatically control the authorization and
authentication policies for these new users. Is this possible in WLS
7.0?
Previous interfaces for this type of thing are deprecated (mostly in
the Realm
stuff). There do seem to be some MBeans in the weblogic.management.security
packages, however these are not accessible MBeans because they do not
extend
from WeblogicMBean and therefore can not be looked up via the
weblogic.management.Helper class. Is there another way to get at the
current
implementation of these interfaces?
Ponch
"Michael" <[email protected]> wrote in message
news:[email protected]..
Is there a way to programmatically add users to Weblogic 7? I'm buildingup a
website
and want to give my visitors an opportunity to register with the site.
The code samples I found until now are not working
cheers,
michael -
Programmatically creating postscript files for office documents
Hi All
I am in the process of experimenting with vb.net to open up a word document in the background and create a postscript file, which i would then use to create a pdf. This currently is a windows service and seems to run ok when the same code runs through a windows form application.
The problem i am having is with the "When creating a postscript file you have to sent the host fonts" error message, which seems to be fairly common judging by numerous articles on various forums. However, none of the solutions seem to solve my problem.
I have set the "Do Not Send Fonts To Adobe PDF" option to OFF on printer defaults, on the current printer setup and even on the printer settings for that application (go to print, properties etc from within Word).
However, whenever i run the code i get the error message. I then made the instance of word visible and checked the application settings for the adobe pdf printer.... the "Do Not Send Fonts To Adobe PDF" is now ticked. But when i close this down, and open word as a normal user would and check the setting it is off! Why would this be?
Can i programmatically change this setting when word opens and before i run the post script file creation code? Where is this value for the setting stored? I do not understand why this is resetting in the instance of word through code? Is it something to do with setting the active printer and at this point using the default setting?
Any help would be appreciated.
Thanks in advance
NicYou say you are doing this as Windows service – does this mean you are running this on a server of some sort? If so, that is NOT ALLOWED.
From: Adobe Forums <[email protected]<mailto:[email protected]>>
Reply-To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>>
Date: Wed, 26 Oct 2011 04:31:13 -0700
To: Leonard Rosenthol <[email protected]<mailto:[email protected]>>
Subject: Programmatically creating postscript files for office documents
Programmatically creating postscript files for office documents
created by nic.eastham<http://forums.adobe.com/people/nic.eastham> in Acrobat SDK - View the full discussion<http://forums.adobe.com/message/3990878#3990878 -
Programmatically Creating Controls
I have figured out how to programmatically modify controls, but do not know
how to programmatically create controls. I am using Labview 6i. Any
suggestions?
Thanks,
PeterYou cannot programmatically create a new LabVIEW control on the front panel
of a VI.
The best you can do is to programmatically open references to templates VIs
and Controls files (*.vit,*.ctt) and let the user interact with them. New
VIs and controls are created
in memory when you open references to templates.
Jean-Pierre Drolet
Scientech R&D
"Peter T" a écrit dans le message news:
3b0ac9d0@newsgroups....
> I have figured out how to programmatically modify controls, but do not
know
> how to programmatically create controls. I am using Labview 6i. Any
> suggestions?
>
> Thanks,
>
> Peter
>
>
LabVIEW, C'est LabVIEW -
How to programmatically add user comment using human task data control
Hi,
We create the task form by using “create Task flow based on Human task”. I need to programmatically create and insert the user comment for the task. I know I need to create and insert a new element to the userCommentIterator that linked to the human task data control. But I could not get it work or find any related detail sample coding. Please help.
Thanks a lot,
Helenpost it in soa suite forum
SOA Suite
or bpel forum
BPEL
to get.. quick reply. -
Attempting to invoke the createUser operation (using Version 10.0) is resulting in:
Runtime Exception while calling invoke. Invoking management operations on Realm, UserLockoutManager and Security Provider MBeans via Edit MBeanServer is illegal.
I can see nothing in the docs that says this opertaion is not permitted. Is there an example somewhere of code that successfully does this in case I'm missing something?Hi Gabi,
oops, sent that previous post by accident before I was done... <grin>
Here is how you want to do it programmatically
BasicRealm realm = Security.getRealm(); //weblogic.sercurity.acl
ListableRealm realmDump = null;
//cast the realmDump to ListableRealm so we can call methods like newUser, newGroup, etc.
try {
realmDump = (ListableRealm)realm;
} catch (Throwable t) {
System.out.println("Could not cast realm to realmdump -- the realmClass is not a
ListableRealm");
out.print("Could not cast realm to realmdump -- the realmClass is not a
ListableRealm");
//now you can call any ListableRealm method off of realmDump
//for example....
Enumeration enum = realmDump.getGroups();
That should do it. You could put that code in a servlet or JSP and it will work just fine.
I'm not sure exactly what packages you need to import, other than the fact that
weblogic.security.* will be a must
Cheers,
Joe Jerry
Gabi wrote:
Hi,
In a production environment, where there is a need to set the environment in a
transparent way (to the user), is it possible to create User/Group/ACL programmatically?
that is, for instance, using the management extension (JMX) to get a security
MBean with a "create user" operation.
cheers,
Gabi, -
Is there a way to create user logins or some other way to ...
Is there a way to create user logins or some other grouping for a set of applications to use (memory) resources optimally -- for example only mail and Safari and Word in one grouping and another for Safari and an audio recording application, etc.?
It is possible to use Parenal Controls to limit which applications can be used be a particular user account.
But it's not really necessary as far as managing memory.
Matt
Maybe you are looking for
-
Lightroom crashes every time I try to change the font color of my identity plate
I use the LRB portfolio plugin to create my website. Every time I try to change the color of my identity plate, lightroom crashes immediately. I can change the font and size without the problem, only a color change causes the crash. I tried to trash
-
Java EE 5 request.getRequestURL() change
Hello, I have a problem with change of the method HttpServletRequest.getRequestURL() in my action servlets. I have this situation: URL matches http://server/app/page-key-word-string These URLs generates 404 Tomcat error page, which redirects to redir
-
I can't seem to move or delete files or folders on my MacBook Air mountain lion system. It doesn't appear that changing permissions works either? Any ideas?
-
Need to exclude a period in query but should be able to add after execution
Hi all, I have to exclude a period (say 016) in the query by default. This I can do by just making 016 as "Exclude from selection" but the problem is user should be able to add if he wants. In simple, By default 016 shold be excluded but user should
-
User I.d. Wrong in app store
All of a sudden my user name changed in the app store so I can no longer update or purchase apps. Don't know why or how. User name did not change anywhere else on the iPad including iTunes etc. does anyone know how to change the user name in th ap