Need Help withAuthentication after password change.

Hi
I have to check always the user and his password against AD. the user would be using his email to login to the application. hence i need to get his principalName and then reauthenticate him. I am using a default user and password to search and get the principalName.
This small piece of code achieve it.
public static void main(String[] args) {
        // Identify service provider to use
        Control[] connCtls = null;
        Hashtable env = new Hashtable();
        env.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.ldap.LdapCtxFactory");
        env.put(Context.PROVIDER_URL, "ldap://192.168.0.18/dc=mydomain,dc=com");
        env.put(Context.SECURITY_AUTHENTICATION, "simple");
        env.put(Context.SECURITY_PRINCIPAL,"[email protected]");
        env.put(Context.SECURITY_CREDENTIALS,"p@ssw0rd");
        DirContext ctx1 = null;
        try
            // Create the initial directory context
            LdapContext ctx = new InitialLdapContext(env,connCtls);                  
            SearchControls constraints = new SearchControls();
            constraints.setSearchScope(SearchControls.SUBTREE_SCOPE);
            NamingEnumeration e2 = ctx.search("","[email protected]",constraints);
            while(e2.hasMoreElements())
                System.out.println("LdapLookUp.main()-searched");
                SearchResult nc = (SearchResult)e2.nextElement();
                Attributes atrr = nc.getAttributes();
                String userPrincipalName = (String)atrr.get("userPrincipalName").get();
                System.out.println("main()-Atrr-"+userPrincipalName);
                    ctx.addToEnvironment(Context.SECURITY_PRINCIPAL, atrr.get("userPrincipalName").get());
                ctx.addToEnvironment(Context.SECURITY_CREDENTIALS,"testp@ssw0rd");
                ctx.reconnect(null);
                    System.out.println("main()-Reconnected");
          catch(Exception e)
               e.printStackTrace();
     }i run this class successfully, Now if the administrator resets the user password on AD and if i still run the same class using the old password it works fine... :(
I have tried using closing the context and then opening a new context also. Any suggestions regarding this would be very helpful

Thanks very much for the info... I used the registry fix method suggested and it worked successfully.
But what i did not understand is the kb info is for change of password using NTLM but here the Administrator used the AD UI itself. and the program uses LdapContext (JNDI)... so it should have worked right.
Oh one more thing how did you figure out the problem was NTLM issue? :)

Similar Messages

  • The login page of EM lost just after password changed

    hi,
    recently, i changed the passwords of SYS, SYSTEM, SYSMAN. when i tried to manage the system through a browser again, i found there is no way to login EM then. I tried to change the passwords back to the previous passwords which created during installation, I wrote 'alter user SYSMAN identified by abc-123' within the sqlplus window and run the statement, but i got a message: 'ORA-00922: missing or invalid option'.
    so, how can i change back the password for the system users?
    or, what should i do after passwords changed, so that let the login page come back?
    thanks!
    ----guo.

    This is because you haven't made changes in emoms.properteis file because password used by the oms are located in the
    $ORACLE_HOME/sysman/config/emoms.properties files
    Any way problem is curable
    1 Go to DBHOME/bin ,Issue comamnd
    alter user sysman identified by "abc-123",
    2 Go to OMSHOME/bin
    emctl stop oms
    3 change the repository password by using comamnd setpasswd oms ,
    4 Start the oms and try to login again
    This is not supported way of changing the passsword , You should use the configuration ui to change the password for the Management Services and Repository target. That is the correct, supported way of setting the password for that target.

  • Computer fails to boot up after password change. After new password keyed in, computer also asked for old password. But even when old password supplied, computer just freezes and fails to boot up. What is causing the problem and how can one solve it?

    Changed password on MacBook Pro recently. But after password change. Computer ask for old password, thereafter. Even when correctly supplying the old password. Computer system does not boot up and just freezes. What is causing the problem and how can one resolve the issue?

    OS X 10.7 Lion, 10.8 Mountain Lion, 10.9 Mavericks and 10.10 Yosemite
    Reset Password
    Start the computer,then press and hold down command and R keys to start into recovery partition.
    When you see the Apple logo, release the keys.
    Wait until  OS X Utilities window shows up.
    Move the mouse pointer to the menubar at the top and click "Utilities", then select "Terminal"
    from the drop down.
    Terminal window will appear.
    Type in   resetpassword   and press enter on the keyboard.
    Leave the Terminal window open.
    Reset Password Utility window will open with Macintosh HD selected.
    Select the user account from the popup menu box under “Select user account”.
    Enter a new password.
    Reenter the new password for the user.
    Enter a hint.
    Click the "Save" button.
    Click  in the menubar and select Restart.
    Log in.
    If Keychain dialog box appears, select “Create New Keychain”.

  • I need help..after I've updated my iMac to the efi 1.3.. After rebooting it won't start at all.. Instead it's giving this beeping sounds..repeatedly..

    I need help..after I've updated my iMac to the efi 1.3.. After rebooting it won't start at all.. Instead it's giving this beeping sounds..repeatedly..

    http://support.apple.com/kb/HT2341

  • Admin permanent status gone after password change

    Hi everyone.
    a couple of days ago i decided to change my password as good safety measure. changed as usual, only getting a message about keychain and a possible need to do the change in it after unlocking. seemed pretty standard to me, don't know if it is. (6 month mac user...)
    however, for some strange reason, afterwards the change, even if i am still an admin in the user accounts i have to identify myself with pass every time i need to do some change in admin areas, as changing the apps in the apps folder.
    i seem to be working as a standard guest , needing to elevate my status every time i need to something standard as changing my apps or renaming them.
    i've tried correcti the permissions in the disk utility and also tried to repair my keychain, without great sucess.
    anyone knows how can i get my permanent admin status again? it's a pain to need to type a password every time i want to drag and drop an app!
    Filevault is active on my home folder.
    thanks for your help
    filipe

    Macbook-de-Filipe:Applications filipe$ ls -aldeO /Applications/scilab-5.1.1.app
    drwxr-xr-x@ 3 filipe wheel - 102 17 Abr 20:42 /Applications/scilab-5.1.1.app
    for example this one. an app in Apps folder i wanted to update
    i didn't changed app folder permissions before. i believe all this weird behaviour appeared after i changed my password.is there a system log i can see?
    i was cheking the app folder permissions and is :
    system : read and write
    wheel : read
    everyone: read
    i haven't changed them before but i have found that if i had a admin group with read and write permissions i can have back my standard usage. however i don't know the implications of this and don't like treating the symptom, prefer instead to treat the cause
    thanks for your help V.K.

  • Disable AD user after first successful login (after password change) after x amount of days regardless of activity

    I've been searching for over a week high and low now trying to find a way to do this via PS.
    We'd like to lockout certain users (we can put them in a group/OU) 30 days after their first successful log in - the one requiring
    password change by them.
    And we'd like to disable it REGARDLESS of their activity.
    All the tips and scripts I've found look for 'inactivity', date created etc.
    Only parameters I need are 30 days AFTER the first log in. Accounts might be created 60 days before actual use, but still need to be disabled 30 days after their first successful log in.
    Any tips would be GREATLY appreciated!

    I don't think you're going to get the kind of solution you want via scripting. As jrv noted, usually this kind of issue is managed by using account expiration and password expiration. If that won't work for you, then I would recommend looking into supported
    third party tools that can help you get where you need to go.
    -- Bill Stewart [Bill_Stewart]
    As Bill points out you  need to look into third party tools.  If there is any legitimate legal or industry need for this then there wil be third party tools.  Having worked in medical software systems \I can tell you there is not. There are
    old systems that use now-obsolete mechanisms that do things similar to what you are asking.  They are no longer usable.
    I think if you sat down with those asking you to do this and had them get the actual industry and government rules on the table you would see that this is not what they are asking you to do.  It aslo doesn't make much sense from a technical standpoint.
    Just set the password expiration.  That is what it is designed for. To force reauth just set the account so the user cannot set the password.  Use the reauth web page to allow the user to set a new password.  Use the corporate disclaimer
    or a desktop link to notify users what to do when the password expires.
    ¯\_(ツ)_/¯

  • Skype account crash after password changing

    Hello,
    in the morning I checked which of my devices are connected to the same Skype ID and I saw about 3 devices with showplaces. I typed /remotelogout and changed my password. The problem is that after the password changing proccess my Skype Account was blocked even with the new password after a PC Restart. This is another account of mine.
    Now, I can't access my account(the system says that the password or username may be inccorect, which is not true), nor change that password to gain my access back because I have forgotten my e-mail(and log in dates) of that Skype account. What should I do?
    If necessary to check the stuck Skype ID, I will give to an Administrator via PM, the new password, the old one and the ID.
    Thanks in advance!

    You will need the original email account to restore your password. If not the only way you can restore it is by contacting customer support:
    https://support.skype.com/en/faq/FA1170/how-can-i-​contact-skype-customer-service?q=support
    You can allways try to reset your Skype:
    Quit Skype or use Windows Task Manager to kill any Skype.exe process. Go to Windows Start and in the Search/Run box type %appdata% and then press Enter or click the OK button. The Windows File Explorer will pop up. There locate a folder named “Skype”. Rename this folder to something different, e.g. Skype_old.
    Next go to Windows Start and in the Search/Run box type %temp%\skype and then press Enter or click the OK button. Delete the DbTemp folder.
    Restart Skype.
    N.B. If needed, you will still be able to re-establish your call and chat history. All data is still saved in the Skype_old folder.

  • Need Help on How to Change The Encryption Key and or Change security settings

    Hello, i just installed the wireless router and i would like to know how i can change the encryption key or change the security settings (i want it so you do not have to answer it with a password). Thank you in advance.
    Message Edited by DARK_MARIO on 01-06-200706:10 PM

    Hi…
    In order to change the wireless settings of your router you need to login into the router configuration page. Open your internet explorer browser…in the address bar type http://192.168.1.1 ( Default IP address). Leave the username field balnk……type admin as password (If you have not changed the router password). When the setup page loads fully…..click on the tab that says wireless. Just below the main tab wireless ….click on the sub tab that says wireless security. You can Change the wireless security settings here. After the changes are made click on save settings.

  • Newbie needs help comprehending CSS Password Manager functions

    Hello All:
    I own a TP W500 4062-27U running Windows 7 Ultimate.  The computer is trouble-free.
    I am seeking a solution to the following need:  An application that will securely remember my passwords for various websites, etc. and enable me to log in using the fingerprint reader or similar.
    I am aware that Lenovo provides both Fingerprint Reader software and Client Security Solution software, but I don't know whether or not either one (or both) of these applications will provide the functionality I am seeking.  I have spent a fair bit of time looking around the Lenovo website, but cannot find a document that describes (in a general, overview manner) the functionality that CSS provides.
    I don't need to log into VPNs, or company networks, or anything really fancy like that - I just need something that will enable me to log into about 20 different websites, using a different password for each website.  Right now, I'm generally using the same password for every website (that way, I can remember what it is), and as I think you will agree, that is probably not a very good practice so far as security is concerned.
    If anyone could point me towards a document that explains how I can get CSS to do what I want it to do, I would be very grateful.  If CSS does not have the functionality I am seeking, I would very much appreciate a recommendation of software - possibly non-Lenovo - that does provide the functionality I am seeking.
    Thanks very much for your assistance.
    Michael

    Hi PanEuropean2,
    Welcome to Lenovo Forum!
    In regard to your question, Client Security Solution (CSS) should be the right fit for you.
    I have a T410 with Win 7, and have several passwords to remember which is really killing me. However, by using CSS, Fingerprint software and Password Manager, I need to enter all the passwords only once when access a website or a tool, and let it saved in CSS.
    The next time i turn on the machine and open up a website which needs user ID and password, I just need to swipe the fingerprint that I've enrolled, then viola!
    Just take note that after the first swipe of fingerprint, tools or website that are to be accessed later will automatically show the password in the box directly without having to swipe fingerprint again. You just need to click to log in. I"m not sure if this is the experience you're looking for, however, no harm to give it a try.
    Here's the user guide for CSS. It has
    Client Security Solution components
    Client Security Solution installation considerations
    Client Security Solution features
    Hope this helps
    Cheers,
    Cleo
    WW Social Media
    T61, T410, x240, Z500, Flex 14
    Important Note: If you need help, post your question in the forum, and include your system type, model number and OS. Do not post your serial number.
    Did someone help you today? Press the star on the left to thank them with a Kudo!
    If you find a post helpful and it answers your question, please mark it as an "Accepted Solution"!
    Follow @LenovoForums on Twitter!
    How to send a private message? --> Check out this article.
    English Community   Deutsche Community   Comunidad en Español   Русскоязычное Сообщество

  • Need help w/wgrt54gs and changing the ip address.

    I need help changing the ip address to match my ip address i got the unit from a friend and don't know the password.

    Press and hold the reset button for 30 seconds and release.  Wait 30 seconds and power cycle the router.  Connect vie wired computer to 192.168.1.1 username blank password admin and configure your router normally.

  • Dbconsole wont start after password changes

    I have an oracle database on a test windows image that i haven't used for a while. the passwords for lots of accounts had expired, including MGMT_VIEW. I have reset the password on the account to MGMT_VIEW without realising that wasn't the original password for this account and also that you should not touch the password for this account (although what you are supposed to do with it, when Oracle is complaining that the password has expired, is another question). Now however, the dbconsole won't start up at all.
    the release of Oracle is 11.1.0.7
    1) Is there anything that can now be done to "fix" the dbconsole ?
    2) where are the logs for the dbconsole that would explain why it is failing to start ?
    I realise now (now everything has failed!) that MGMT_VIEW is a super important account and you should never touch its password (because it will break lots of things!) but it is done now and i need help to get my database working again.
    sorry for the stupid question but hope someone has some hints.
    thanks

    i solved the issue after another days work.
    i couldn't reconfigure the dbconsole because of the max reuse limit (i was trying to reuse the same password) set in the MONITORING_PROFILE profile. it was causing all sorts of problems when the emca tried to recreate the DBSNMP user object.
    after working through lots of KMs to manually drop the dbconsole / EM repository objects and figuring out this limit above, then i managed to reconfigure dbconsole and get it to run again.
    thanks for your help.

  • TS3899 My iPad won't download mail after password change

    I recently changed my password on hotmail. Since then my hotmail account won't download any emails after 2011. when I use the. Ail app on my iPad it says I have 97 emails to download, 14 new emails. I've deleted the account. I've turned off the iPad. I've done a reset using the home button and off button. Nothing! Help!,

    When you changed your password did you change it on hotmail, via safari....for example, went to hotmail.com, signed into your hotmail, followed the password changing protocols. Then go into your iPad's settings and your hotmail account and changed the password to match?
    When you deleted your account info off your iPad did you use the outlook preset when you added it back in?

  • SCOM is not opening after password change

    Hi
    I am unable to open SCOM after i change the password of account from which i have installed scom and sql server. Is there any way to fix this problem?? I used same account for all the accounts needed during installation of scom. It was working fine but when
    i changed my password of account, after that SCOM is not opening

    Hi 
    you need to change the password of services running with this account in service.msc on all scom servers to make scom to functional.
    Regards
    sridhar v

  • Hey everyone :) I need help resting my password secuirty questions

    Hey everyone okay so its getting a little bit frusturating because this is the second time now that i've had to rest my password secuirty questions, but i guess i have no one to blame but my self ugh. Anways sorry, i know kind of how to rest it but it says that i need a rescue email to rest it to and i guess id don't have a rescue email yikes. So i need help putting in a rescue email. Help anyone? Please i really wanna buy song grrrr help
         Savannah S. xx

    You won't be able to add a rescue email address until you can answer your questions, you will need to contact iTunes Support / Apple in your country to get the questions reset.
    Contacting Apple about account security : http://support.apple.com/kb/HT5699
    When they've been reset you can then use the steps half-way down this page to add a rescue email address for potential future use : http://support.apple.com/kb/HT5312

  • Outlook prompting for password after password change

    I have a client who has Exchange 2013 and the PCs run Windows 8.1 with Office 2013.
    The users just started having the following problem. Their domain passwords are expiring and when they update them with a new one, Outlook starts prompting them for a password when they open it and periodically while Outlook is running. They keep entering
    the new password and checking the box to remember it, but the password prompt keeps coming back.
    I've checked and the account in Outlook does not have the box checked to always prompt for logon credentials. I did notice that the proxy authentication is set for NTLM so I changed it to Basic, restarted Outlook and there was no password prompt and the
    user has not seen one since.
    Any idea why having the proxy authentication set to NTLM would cause this after the domain password changed? It has been set to NTLM rather than Basic for years now. Exchange 2013 has been in use there for about 6 months and Office 2013 longer than
    that. Windows 8.1 has been on the computers for 3-5 months so I don't think that's it either. I've tried with our domain account we have setup there and with a test user account by changing the password on them but with the proxy authentication set to NTLM
    I haven't had the password prompt appear other than once the next time Outlook is opened after the password change, and that is to be expected.
    So it's not every user account but a good number of them this is happening with.
    Jonathan

    I have an update.
    There must be a GPO or setting in Outlook changing the proxy authentication to NTLM because this morning it was changed back to NTLM from Basic. They all either shut down or restarted their computers since I worked on them Friday.
    One user got the password prompt one time when starting Outlook. She entered the password and that was it. But she was unable to connect to a shared calendar. She put her computer to sleep, woke it up, logged in, and then was able to connect to the shared
    calendar. I don't understand that.
    Another user could not get the password prompt to go away this morning no matter how often he input his password, and he also was unable to connect to the shared calendar. So I changed the proxy authentication back to Basic again, restarted Outlook (which
    is required), got no password prompt, and he was able to connect to the calendar.
    I realize the calendar issue is tied to the password issue. What I don't understand is why these people are getting the password prompt ever since they changed their domain password.
    I have a test account and test PC set up in a VM and it does not have any of these problems. I've changed its password 3 times but I never get a prompt when opening Outlook and it is set to NTLM.
    I hope someone out there has an idea why changing their password now is causing this authentication problem in Outlook.
    Jonathan

Maybe you are looking for

  • I can only view one email at a time

    I can only view one email at a time when i open my email app

  • Moving average price changed drastically

    Hi Experts, i having one problem, i having material of ' A '  1392.5 Kg having moving average price of 6.52 $ per kg (as of  02.03.2009 ), i issued goods to order on 17.03.2009 with movement type 261 of 233.60 Kg for 646.74 $ here new moving average

  • Palant wise Material Stock

    Hi All, Can anyone tell me any FM which will return the total stock with respect to a perticular material + plant.It will just be like transaction MMBE. We are looking for FMs other than BAPI_MATERIAL_GETSTOCK,L_MM_MATERIALS_READ_QUANTITY and MB_READ

  • Word macro ConvertToPDF absent in Adobe 9?

    Dear all, In VBA I make use of the macro     Application.Run MacroName:="ConvertToPDF" This worked fine in previous versions of Acrobat. Since an upgrade to Adobe 9 The code fails on this line. Which macro has come in the place of ConvertToPDF? There

  • Some Contacts getting combined with others when syncing from google

    I am having an issue where some of my contacts are getting merged when syncing from google. For example I have 3 contacts: Company 1 dispatch which has two phone numbers   Company 2 dispatch which has two phone numbers   Company 3 dispatch which has