How to chage password of user's webLogic  programmatically

Hi
My English isn't very good.
I use jdeveloper 11.1.1.3.0
I created a User Id and Password in Application -> Secure -> Users in jazn-data.xml. I know it isn't a common way but now I should use it.
I need a way that each user can change his/her password from a form I make for him/her.How can I do it?
also I want to know that is it possible to create user/pass programmatically?
Habib
Edited by: Habib Eslami on Feb 23, 2013 9:54 PM
Edited by: Habib Eslami on Feb 25, 2013 4:18 AM

Hi Habbi ,
You can create a user by using below code,
And also you can change the password for specific user by using change password method. Every thing possible with ADF :)
Note : before proceding with this you need to create group named 'member' (You can specify any thing) in your weblogic admin
public boolean createUser(String username, String password) {
try
JpsContextFactory jps = JpsContextFactory.getContextFactory();
JpsContext jpsContext = jps.getContext();
IdentityStoreService storeService =
jpsContext.getServiceInstance(IdentityStoreService.class);
IdentityStore is = storeService.getIdmStore();
UserManager mn = is.getUserManager();
RoleManager rm = is.getRoleManager();
Principal p =
mn.createUser(username, password.toCharArray()).getPrincipal();
Role r = is.searchRole(is.SEARCH_BY_NAME, "member");
rm.grantRole(r, p);
result="success";
return true;
catch (Exception e) {
System.out.println(e.getMessage());
if(e.getMessage().equalsIgnoreCase("User "+userName.getValue().toString()+"already exists"))
// errorMessageOT.setValue("User already exists!");
else
e.printStackTrace();
result="error";
return false;
}

Similar Messages

  • How to Reset Password of User while not connected to Domain using Local Admin Account

    How to Reset Password of User while not connected to the Domain using Local Admin Account
    (I have the use of a local admin account), and I want to help a user reset their password who has logged in the PC and had their credentials cached, but forgot this password. 
    In Local Admin Account :
    When I go to Control Panel, users, users, manager user ; I cannot see any users in this window except the local admin account, and, so I cannot reset a user password this way.
    When I go to lusrmgr.msc, then users ; the local admin account will display only. 
    If I go to command prompt and type "net user", this will not display any users who have logged in to the computer, and so I cannot use "net user" to reset a password.
    I don't want to use any disks, 3rd party programs, or create a VPN connection to the domain.  I just want to help a user who calls in and forgets their password.

    Hello Keith,
    I know this is an old thread but I'm trying to better understand how I could change the domain password while not on the network. What I'm getting from your post is that you:
    1. Create a local user account (not a domain user)
    2. Login with that local user account
    3. Connect to the VPN while logged in as a local user
    4. Log out of the local account and login with the domain credentials
    Now, my question is based on the assumption that the password created on the local account is the same password that one will use to login to the domain account? Also, is the local user account the same as the domain account?
    Thanking you in advance!

  • How to reset password for user sap*

    Hi friends,
    How to reset password for user sap*  if any solution please mail me.
    Thanks,
    Yogesh

    Hi,
    <b><u>Steps for Reset SAP* Password</u></b>
    If you forgot or lock "Administrator or J2EE_ADMIN" password just follow below steps:
    STEP-1: Enable "SAP*"
    1.Start the Config Tool C:\usr\sap\<SID>\<engine-instance>\j2ee\configtool\configtool.bat
    Ex: D:\usr\sap\F02\JC00\j2ee\configtool --> configtool.bat
    2.Goto cluster-data --> Global server configuration --> services --> com.sap.security.core.ume.service
    3.Double-click on the property "ume.superadmin.activated = TRUE"
    4.Double-click on the property "ume.superadmin.password=<Enter any password ex: abc123>"
    5.Save.
    6.Restart the engine.
    STEP-2: Login with "SAP*" into portal
    1. http://<host>:<Port>/useradmin/index.jsp
    2. Enter userid / password as" SAP* / <password ex: abc123>"
    3. Search for "Administrator" user
    4. Reset or change password for "Administrtor"
    STEP-3: Disable "SAP*"
    1.Start the Config Tool C:\usr\sap\<SID>\<engine-instance>\j2ee\configtool\configtool.bat
    Ex: D:\usr\sap\F02\JC00\j2ee\configtool --> configtool.bat
    2.Goto cluster-data --> Global server configuration --> services --> com.sap.security.core.ume.service
    3.Double-click on the property "ume.superadmin.activated = FALSE"
    4.Save.
    5. Restart the engine.
    STEP-4: Login with "Administrator"
    1. http://<host>:<Port>/useradmin/index.jsp
    2. Enter userid / Password as "Administrator / <password>
    3. it will ask change password just change it.
    Please follow steps one by one. it should resolve your issue.
    Thanks,
    Nagaraju Parlapalli

  • How to display active directory users through weblogic portal Application?

    Hi,
    Does anyone has faced this situation?
    I configured the activedirectory and able to see the users and group in the weblogic console at Security->Realms->Myrealm->users. when I run my portal application,I am able to see only the users that are configured in embedded weblogic LDAP ie, I can see only the users weblogic,portaladmin and yahooadmin that are of defaultauthenticator provider.I need to display the active directory users also in our portal.
    I have two doubts on this?
    1)Is it I need to write custom code to view the active directory users in our portal?
    2)Does I need to use any jars that supports active directory authenticator?
    I would appreciate if any one can reply on this with helpfull docs/information.
    We are using BEA 8.1 SP4.
    Windows 2000.
    Surendra

    Hi,
    I too have a similar kind of requirement, i use a jsp to do this activity, but i get an exception, i have shown the entire jsp code below,
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <%@ page import="java.util.Set" %>
    <%@ page import="javax.naming.Context" %>
    <%@ page import="weblogic.jndi.Environment" %>
    <%@ page import="weblogic.management.MBeanHome" %>
    <%@ page import="weblogic.management.configuration.DomainMBean" %>
    <%@ page import="weblogic.management.configuration.SecurityConfigurationMBean" %>
    <%@ page import="weblogic.management.security.RealmMBean" %>
    <%@ page import="weblogic.management.security.authentication.AuthenticationProviderMBean" %>
    <%@ page import="weblogic.management.security.authentication.UserPasswordEditorMBean" %>
    <%@ page import="weblogic.security.providers.authentication.LDAPAuthenticatorMBean" %>
    <%@ page import="weblogic.management.configuration.EmbeddedLDAPMBean" %>
    <%@ page import="weblogic.management.security.authentication.UserEditorMBean" %>
    <%@ page import="weblogic.management.security.authentication.UserReaderMBean" %>
    <%@ page import="weblogic.management.security.authentication.GroupReaderMBean" %>
    <%@ page import="weblogic.management.utils.ListerMBean" %>
    <%@ page import="javax.management.MBeanException" %>
    <%@ page import="javax.management.modelmbean.RequiredModelMBean" %>
    <%@ page import="examples.security.providers.authentication.manageable.*" %>
    <%@ page import="weblogic.security.providers.authentication.ActiveDirectoryAuthenticatorMBean" %>
    <%@ page import="weblogic.management.utils.InvalidParameterException" %>
    <%@ page import="weblogic.management.utils.NotFoundException" %>
    <%@ page import="weblogic.security.SimpleCallbackHandler" %>
    <%@ page import="weblogic.servlet.security.ServletAuthentication"%>
    <%!
    private String makeErrorURL(HttpServletResponse response,
    String message)
    return response.encodeRedirectURL("welcome.jsp?errormsg=" + message);
    %>
    <html>
    <head>
    <title>Password Changed</title>
    </head>
    <body>
    <h1>Password Changed</h1>
    <%
    // Note that even though we are running as a privileged user,
    // response.getRemoteUser() still returns the user who authenticated.
    // weblogic.security.Security.getCurrentUser() will return the
    // run-as user.
    System.out.println("------------------------------------------------------------------");
    String username = request.getRemoteUser();
    System.out.println("User name -->"+username);
    // Get the arguments
    String currentpassword = request.getParameter("currentpassword");
    System.out.println("Current password -->"+currentpassword);
    String newpassword = request.getParameter("newpassword");
    System.out.println("New password -->"+newpassword);
    String confirmpassword = request.getParameter("confirmpassword");
    System.out.println("Confirm password -->"+confirmpassword);
    // Validate the arguments
    if (currentpassword == null || currentpassword.length() == 0 ||
    newpassword == null || newpassword.length() == 0 ||
    confirmpassword == null || confirmpassword.length() == 0) { 
    response.sendRedirect(makeErrorURL(response, "Password must not be null."));
    return;
    if (!newpassword.equals(confirmpassword)) {
    response.sendRedirect(makeErrorURL(response, "New passwords did not match."));
    return;
    if (username == null || username.length() == 0) {
    response.sendRedirect(makeErrorURL(response, "Username must not be null."));
    return;
    // First get the MBeanHome
    String url = request.getScheme() + "://" +
    request.getServerName() + ":" +
    request.getServerPort();
    System.out.println("URL -->"+url);
    Environment env = new Environment();
    env.setProviderUrl(url);
    Context ctx = env.getInitialContext();
    MBeanHome mbeanHome = (MBeanHome) ctx.lookup(MBeanHome.LOCAL_JNDI_NAME);
    System.out.println("MBean home obtained....");
    DomainMBean domain = mbeanHome.getActiveDomain();
    SecurityConfigurationMBean secConf = domain.getSecurityConfiguration();
    // Sar
    EmbeddedLDAPMBean eldapBean = domain.getEmbeddedLDAP();
    System.out.println("Embedded LDAP Bean obtained...."+eldapBean );
    RealmMBean realm = secConf.findDefaultRealm();
    System.out.println("RealmMBean obtained....");
    AuthenticationProviderMBean authenticators[] = realm.getAuthenticationProviders();
    System.out.println("AuthProvMBean obtained....");
    // Now get the UserPasswordEditorMBean
    // This code will work with any configuration that has a
    // UserPasswordEditorMBean.
    // The default authenticator implements these interfaces
    // but other providers could work as well.
    // We try each one looking for the provider that knows about
    // this user.
    boolean changed=false;
    UserPasswordEditorMBean passwordEditorMBean = null;
    System.out.println("UserPwdEdtMBean obtained....");
    //System.out.println("Creating MSAI....");
    //ManageableSampleAuthenticatorImpl msai =
    // new ManageableSampleAuthenticatorImpl(new RequiredModelMBean());
    //System.out.println("Done....");
    for (int i=0; i<authenticators.length; i++) {
    System.out.println("### Authenticator --->"+authenticators);
    if (authenticators[i] instanceof ActiveDirectoryAuthenticatorMBean)
    ActiveDirectoryAuthenticatorMBean adamb =
    (ActiveDirectoryAuthenticatorMBean)authenticators[i];
    System.out.println("### ActiveDirectoryAuthenticatorMBean .....");
    String listers = adamb.listUsers("*",0);
    while(adamb.haveCurrent(listers))
    System.out.println("### ActiveDirectoryAuthenticatorMBean user advancement.....");
    adamb.advance(listers);
    if (authenticators[i] instanceof UserPasswordEditorMBean) {
    passwordEditorMBean = (UserPasswordEditorMBean) authenticators[i];
    System.out.println("Auth match ...."+passwordEditorMBean);
    try {
    // Now we change the password
    // Sar comment
    System.out.println("Password changed....");
    //passwordEditorMBean.changeUserPassword(username,
    // currentpassword, newpassword);
    changed=true;
    // Sar Comment
    catch (InvalidParameterException e) {
    response.sendRedirect(makeErrorURL(response, "Caught exception " + e));
    return;
    catch (NotFoundException e) {
    catch (Exception e) {
    response.sendRedirect(makeErrorURL(response, "Caught exception " + e));
    return;
    // Sar code
    LDAPAuthenticatorMBean ldapBean = null;
    UserReaderMBean urMBean = null;
    UserEditorMBean ueMBean = null;
    GroupReaderMBean gMBean = null;
    //ListerMBean lBean = null;
    try
    if (authenticators[i] instanceof LDAPAuthenticatorMBean)
    ldapBean = (LDAPAuthenticatorMBean) authenticators[i];
    String userFilter = ldapBean.getAllUsersFilter();
    System.out.println("userFilter ="+userFilter);
    if (authenticators[i] instanceof UserEditorMBean)
    try
    System.out.println("UserEditorMBean...");
    ueMBean = (UserEditorMBean) authenticators[i];
    System.out.println("List users..."+ueMBean);
    boolean b = ueMBean.userExists("webuser");
    System.out.println("User Exists->>>"+b);
    String cursor = ueMBean.listUsers("webuser", 2);
    System.out.println("List User ----->"+cursor);
    catch(InvalidParameterException e)
    response.sendRedirect(makeErrorURL(response, "ERROR InvalidParameterException:" + e));
    catch(java.lang.reflect.UndeclaredThrowableException e)
    response.sendRedirect(makeErrorURL(response, "ERROR UndeclaredThrowableException :" + e));
    e.printStackTrace();
    catch(Exception e)
    response.sendRedirect(makeErrorURL(response, "ERROR LBean:" + e));
    catch(Exception ex)
    ex.printStackTrace();
    response.sendRedirect(makeErrorURL(response, "ERROR:" + ex));
    return;
    if (passwordEditorMBean == null) {
    response.sendRedirect(makeErrorURL(response, "Internal error: Can't get UserPasswordEditorMBean."));
    return;
    System.out.println("pwd changed ->"+changed);
    if (!changed) {
    // This happens when the current user is not known to any providers
    // that implement UserPasswordEditorMBean
    response.sendRedirect(makeErrorURL(response,
    "No password editors know about user " + username + "."));
    return;
    %>
    User <%= username %>'s password has been changed!
    <br>
    <br>
    </body>
    </html>
    Here is the console log
    User name -->webuser
    Current password -->i
    New password -->u
    Confirm password -->u
    URL -->http://localhost:7011
    MBean home obtained....
    Embedded LDAP Bean obtained....[Caching Stub]Proxy for mydomain:Name=mydomain,Type=EmbeddedLDAP
    RealmMBean obtained....
    AuthProvMBean obtained....
    UserPwdEdtMBean obtained....
    ### Authenticator --->Security:Name=myrealmDefaultAuthenticator
    Auth match ....Security:Name=myrealmDefaultAuthenticator
    Password changed....
    UserEditorMBean...
    List users...Security:Name=myrealmDefaultAuthenticator
    User Exists->>>true
    java.lang.reflect.UndeclaredThrowableException
    at $Proxy1.listUsers(Unknown Source)
    at jsp_servlet.__updatepassword._jspService(__updatepassword.java:411)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
    at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.jav
    a:1006)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:463)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:315)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletC
    ontext.java:6718)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
    at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:37
    64)
    at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2644)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
    Caused by: javax.management.MBeanException
    at weblogic.management.commo.CommoModelMBean.invoke(CommoModelMBean.java:551)
    at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1560)
    at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1528)
    at weblogic.management.internal.RemoteMBeanServerImpl.private_invoke(RemoteMBeanServerImpl.j
    ava:988)
    at weblogic.management.internal.RemoteMBeanServerImpl.invoke(RemoteMBeanServerImpl.java:946)
    at weblogic.management.commo.CommoProxy.invoke(CommoProxy.java:365)
    ... 14 more
    ### Authenticator --->Security:Name=myrealmDefaultIdentityAsserter
    pwd changed ->true
    Can u pls let me know how to get all the entries from LDAP.
    Thanx
    Sar

  • How to run as privileged user in WebLogic

    I am running WebLogic 10.3. Configured a datasource as well as role-based access policies. In my web app and EJB deployment descriptors, I specified <run-as> roles so there is no problem for servlets and EJB's to access the datasource.
    However, I also have some background Quartz jobs that need to access the datasource. When the jobs run, WebLogic complains:
    "User "<anonymous>" does not have permission to perform operation "reserve" on resource "myDataSource"".
    Doing a bit Googling, I found this thread:
    http://objectmix.com/weblogic/535108-data-source-access-supposed-anonymous-user-causing-txfailures.html
    The poster suggested this is a WebLogic bug in version 9.2. The workaround is to add the "weblogic" user to the security policy. I did that, but it does not seem to solve the problem, at least not in a consistent basis.
    Does anyone have any idea how to permanently solve this problem? Do I need to use JAAS to create a security Subject and attach that to my Quartz job and use the runAs() call?
    Thanks,
    Eric
    Edited by: Eric Ma on Jul 5, 2009 9:36 PM

    As I understand for Quartz, I think you should create a security subject for it in your code. I guess the background tasks in Quartz work in separate threads. It is not recommended in EJB application. you can use EJB timer service instead.
    -Albert

  • How to Find Peak Concurrent Users in weblogic

    Hi
    If anyone can help. I have very simple questions regarding application monitoring. I need to write a program to get the following parameters.
    Heartbeat Successful Logins
    Heartbeat Login Failures
    Average CPU Utilization
    Average Concurrent Users
    Peak Concurrent Users
    Average Response Time (Best 10% and Worst 10%)
    I thought of getting all this information from Runtime MBeans, but MBeans properties are much more granular and gives me statistics about services (JDBC/JMS/JTA) and components (EJB/Servlets).
    I have no access any Application monitoring tools ( HP OpenView/ IBM Tivoli / SiteScope / Topaz etc ) . I don’t have time to write sophisticated SNMP traps and agents.
    Is there any easy way to find out the fowling parameters .
    Heartbeat Successful Logins
    Heartbeat Login Failures
    Average CPU Utilization
    Average Concurrent Users
    Peak Concurrent Users
    Average Response Time (Best 10% and Worst 10%)
    It may be possible to write a Proxy Servlet and gather all this matrices, but in that case I don’t know what should be the code or which weblogic API I can utilize.
    Please help , Thanking you in advance
    Tanmoy

    Hi,
    weblogic.management.runtime.ServerSecurityRuntimeMBean have API to provide some of the security data you require.
    The console displays some of the security and performance data.
    check out the monitoring section.
    http://e-docs.bea.com/wls/docs81/adminguide/overview.html#1037864
    http://e-docs.bea.com/wls/docs81/javadocs/index.html
    vasanthi Ramesh

  • How to allow user chaning his password in OBIEE 11g weblogic custom LDAP?

    Hi,
    How to allow user chaning his password in OBIEE 11g weblogic custom LDAP?
    I need to give user an option to do so, without the intervention of any Administrator. I also do not want to make user a Administrator else he will be able to login in weblogic and can do any damages unknowingly.....
    Regards,
    Rahul

    Hi,
    Replace the line in the instantconfig.xml
    <WebMessage name=”kmsgChangePasswordLink”><!–<HTML><sawm:messageRef name=”kmsgUIChangePassword”/></HTML>–></WebMessage>
    with
    <WebMessage name=”kmsgChangePasswordLink”><HTML><sawm:messageRef name=”kmsgUIChangePassword”/></HTML></WebMessage>

  • Firefox has remberd a password to a website ... chessatwork and I get loged in to my main page and when I click on any link it takes me right back to my log in page, where it has it stored.... password and user name,,, whats up and how do I turn that off?

    Firefox has remberd a password to a website ... chessatwork and I get loged in to my main page and when I click on any link it takes me right back to my log in page, where it has it stored.... password and user name,,, whats up and how do I turn that off? chessatwork has ran great for me for many yrs, then one day I down loaded firefox and went to play chess on this site chessatwork.com, well the window popped up asking to remember the log in and pass word and so I said ok, and it did, but now when I click log in and I go to my main page (home) and click on any link, say to play game I return right back to log in

    See http://kb.mozillazine.org/Deleting_autocomplete_entries<br />
    Remove a saved password here: Tools > Options > Security: Passwords: "Saved Passwords" > "Show Passwords"
    You may also need to remove the cookies from that website.<br />
    * Tools > Options > Privacy > Cookies: "Show Cookies"

  • How can i get all the users from weblogic server?

    how can i get all the users from weblogic server?
    i have configurated a LDAP server using iPlanet and
    in weblogic server console i see those users from LDAP
    server. but how can i get all the users in my program
    from weblogic server instead of LDAP server?
    BTW,how to configure a RDBMSAuthenticator and what should i do
    in Oracle? which tables should i create? and how are their architectures?
    Thanks
    Daniel

    BTW, i use weblogic platform 8.1
    "Daniel" <[email protected]> дÈëÓʼþ
    news:[email protected]..
    how can i get all the users from weblogic server?
    i have configurated a LDAP server using iPlanet and
    in weblogic server console i see those users from LDAP
    server. but how can i get all the users in my program
    from weblogic server instead of LDAP server?
    BTW,how to configure a RDBMSAuthenticator and what should i do
    in Oracle? which tables should i create? and how are their architectures?
    Thanks
    Daniel

  • How can I hide the password and user name in url???

    Hi experts,
    I'm creating a login page and know I have a problem.
    The Username and password are verified in a Java class, after checking the user and password, the user should be linked to the portal.
    So far everything has worked well.
    But when I call the lin like this
    res.sendRedirect ("/ irj / portal j_user =" + UserN + "& j_password =" + passw);
    then the user name and Pwasswort appears in the url.
    Can someone tell me how can I hide the password and user name???
    It will be very helpful.
    Thank you
    Edited by: Cilvaring on Aug 5, 2011 12:00 PM

    If there is no specific reason that you have to use sendredirect...thne you can try request.forward.....
    RequestDispatcher rd = request.getRequestDispatcher("pathToResource");
      rd.forward(request, response);

  • How to change password for a user in WLS 7.0 embedded ldap in code?

    I asked the similar question before but don't have an answer yet.
    I need to change password for a user in my Java code. Any help will be
    appreciated.
    Here is my stack trace:
    c:\Test>java -classpath . testEmbeddedLdap
    attribute: uid
    attribute: description
    attribute: objectclass
    attribute: wlsMemberOf
    attribute: sn
    attribute: cn
    javax.naming.NoPermissionException: [LDAP: error code 50 - Insufficient
    Access Rights]; remaining name
    'uid=myRegularUser,ou=people,ou=myrealm,dc=mydomain'
    at com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:2872)
    at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2810)
    at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2616)
    at com.sun.jndi.ldap.LdapCtx.c_modifyAttributes(LdapCtx.java:1374)
    at
    com.sun.jndi.toolkit.ctx.ComponentDirContext.p_modifyAttributes(ComponentDir
    Context.java:255)
    at
    com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.modifyAttributes(Partial
    CompositeDirContext.java:172)
    at
    com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.modifyAttributes(Partial
    CompositeDirContext.java:161)
    at
    javax.naming.directory.InitialDirContext.modifyAttributes(InitialDirContext.
    java:146)
    at testEmbeddedLdap.main(testEmbeddedLdap.java:30)
    Here is my testing code:
    <PRE>
    import java.util.*;
    import javax.naming.*;
    import javax.naming.directory.*;
    public class testEmbeddedLdap {
    public static void main(String[] argv) {
    Hashtable env = new Hashtable(11);
    env.put(Context.INITIAL_CONTEXT_FACTORY,
    "com.sun.jndi.ldap.LdapCtxFactory");
    env.put(Context.PROVIDER_URL, "ldap://localhost:7001");
    env.put(Context.SECURITY_AUTHENTICATION, "simple");
    env.put(Context.SECURITY_PRINCIPAL, "uid=myAdministrator, ou=people,
    ou=myrealm, dc=mydomain");
    env.put(Context.SECURITY_CREDENTIALS, "myAdministrator");
    try {
    DirContext ctx = new InitialDirContext(env);
    String
    sUser="uid=myRegularUser,ou=people,ou=myrealm,dc=mydomain";
    String sOldPassword="myRegularUser";
    String sNewPassword="newpassword";
    for (NamingEnumeration ae = ctx.getAttributes(sUser).getAll();
    ae.hasMore(); ) {
    Attribute attr = (Attribute)ae.next();
    System.out.println("attribute: " + attr.getID());
    ModificationItem[] mods = new ModificationItem[2];
    Attribute mod0 = new BasicAttribute("userpassword",
    sOldPassword);
    mods[0] = new ModificationItem(DirContext.REMOVE_ATTRIBUTE,
    mod0);
    Attribute mod1 = new BasicAttribute("userpassword",
    sNewPassword);
    mods[1] = new ModificationItem(DirContext.ADD_ATTRIBUTE, mod1);
    ctx.modifyAttributes(sUser, mods);
    ctx.close();
    } catch (NamingException e) {
    e.printStackTrace();
    </PRE>
    "Neil Smithline" <[email protected]> wrote in message
    news:[email protected]...
    Two things. First, I'm not exactly sure what password you are trying to
    change. The LDAP server's password or a user's password in the LDAP
    server. Second, could you please post a stack trace.
    Thanks - Neil
    K Wong wrote:
    I am using (javax.naming.directory.DirContext.modifyAttributes) to
    change
    password to our development Weblogic 7.0 embedded LDAP.
    I login as the system administrator (a user in the administratorsgroup),
    but always gets the javax.naming.NoPermissionException - InsufficientAccess
    Rights.
    What user should I use? Any help will be appreciated.

    Hai,
    This condition based execution requires - javascript coding.
    In miscelleaneous tools bar, you have an option of SCRIPT_ITEM writer tool, drag the tool into your WAD layout, and select the properties , choose the editor option and paste your coding. that's it.
    Alternate option :
    in your web application design layout , you will fine XHTML coding editor , there you need to write coding and execute the same.
    Hope this will help to you.
    Assign Points if its really useful.
    Cheers !!!
    Bye
    Regards,
    Giri

  • How to set password policy for apps users

    Hi All,
    Can anyone please help me.
    I am working on apps 11i.
    How to set password policy for users
    Thanks

    Check Note: 189367.1 - Best Practices for Securing the E-Business Suite
    https://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=189367.1

  • How I can recover my user admin password of my computer?

    How I can recover my user admin password of my computer?
    I have an I mac 27 Inch 2009 3.06 GHz Intel core 2 Duo. I cant remember my user admin password to enter my computer to make changes, how can I recover it? I have being entering as a guest user.

    You can't recover the password, but you can reset it.
    If the user account is associated with an Apple ID, and you know the Apple ID password, then maybe the Apple ID can be used to reset your user account password. In OS X 10.10 and later, this option also works with FileVault, but only if you enabled it when you activated FileVault. It's not retroactive. Otherwise, see below.
    Note: If you've activated FileVault, this procedure doesn't apply. Follow instead these instructions.
    Start up in Recovery mode. When the OS X Utilities window appears, select
              Utilities ▹ Terminal
    from the menu bar at the top of the screen—not from any of the items in the OS X Utilities window.
    In the window that opens, type this:
    resetp
    Press the tab key. The partial command you typed will automatically be completed to this:
    resetpassword
    Press return. A Reset Password window opens. Close the Terminal window to get it out of the way.
    Select the startup volume ("Macintosh HD," unless you gave it a different name) if not already selected. You won't be able to do this if FileVault is active.
    Select your username from the menu labeled Select the user account if not already selected.
    Follow the prompts to reset the password. It's safest to choose a password that includes only the characters a-z, A-Z, and 0-9.
    Select
               ▹ Restart
    from the menu bar.
    You should now be able to log in with the new password, but the Keychain will be reset (empty.) If you've forgotten the Keychain password (which is ordinarily the same as the login password), there's no way to recover it.

  • How to create Global password and user information list in Linux

    Hi ,
    OS is : OEL, We have some requirement, we need to create global password and Users information, that location sould be accessable to all users, can any one guide me how to do it in Linux.

    Could you give us a little more details? Are u looking for something like a centralized authentication system? or....what exactly?
    kido

  • How to retrieve password character according to user logged on ?

    Hi,
    Can anybody help on this issue .
    How to retrieve password character according to user logged on ?
    I have a program will runs on multiple logins.I like restrict so that only an admin can  retrieve the password.
    How to do it ?

    > I have a report program which uploads sensitive information to presentation server.The program is also used by multiple users for other use.(billing info on excel sheet)
    That is the bugger with generic (executable) functionality. When used for multiple requirements which are too far from each other then they break or the "lowest common denominator" calls the shots.
    If this data is being uploaded from the application server, then why don't you just protect it there. The S_DATASET for that program context will not be very usefull, because it is generic.... so you can look into using S_PATH.
    > Since a user might have already logged on to system i can only ask a password as a authorization to run the program.
    Again, this means that anyone who knows the generic password (or can display / debug the code) will be able to access the data.
    A better variant of the same would be to create a symbolic service user, and prompt for that user's password before the data is downloaded. You can then use standard functions for prompting for passwords, which also update the lock counter.
    => If the password is locked due to incorrect logins, then the program is locked for this functionality as well.
    => You can periodically lock / unlock / change the access to the program, by administrating the service user in SU01.
    => Do not give this service user any authority at all - you only want to prompt for knowledge of the password, but not actually log the user itself onto the system. (see report RDDPWCHK for some example coding)
    In German this is called "von hinten durch die brust", which means something like "unusual approach but still works anyway".
    > I like to restrict access of retrieving the password  only to a  basis team.(others user can run the program)
    I would still protect the source data itself using unique authority to access it, and then control that.
    Cheers,
    Julius

Maybe you are looking for

  • I was charged over $600 for a phone I returned and it has been reactivated, but they can't take the charge off my bill.

    In September I was charged $650 for a broken phone that was not returned.  I took the phone to Verizon store near my home and asked what I needed to do to return the equipment.  The sales rep said all I needed to do was put it in the envelope and put

  • Allow the user to control the width of the edit forum post input box

    I would like to control the width of of the edit-forum post input box.  This could be: automatically adjust the width of the box so that the box doesn't run off the right edge of the window. have a user global preference to set the preferred width at

  • Parked document 1000 700010042 2010 does not exist, Message no. FP076

    Hi, There is one Document which is not on tax return but made a entry in a GL account (VAT). When I display document from FB03 for fiscal year 2010 the transaction code FB03 is diverting to FBV3 and giving error message : "Parked document 1000 700010

  • Video Compression Help

    Hey guys and gals, I just finished my music video assignment for media production class and everyone thought it was really good, albeit a bit weird haha. I want to put it up on YouTube or Google Video but I dont want it to look crappy. I have like 10

  • Downloads Wont Initiate NEED HELP

    Hey, I'm new to the discussions but this is the last place I can turn to. Recently Safari has just decided not to start downloads (which is really not fun cus I'm a bit of a gamer and need my updates). I've been searching for an answer but all anyone