How do i get username & password?

Can anybody help me in solving this problem.
I have an application,i will give application url to the user.
My requirement is when user access this url, he needs to get authenticated from ActiveDirecoty, i.e. i should not ask for login & password.
I need to do authentication by taking system login & password. And display him directly the main page.
How can i get the system login person username & password,which java package i need to use.i tried using System class but i was unsuccessfull.
Thanks in advance.

<%
String auth = request.getHeader("Authorization");
if (auth == null) {
response.setStatus(response.SC_UNAUTHORIZED);
response.setHeader("WWW-Authenticate", "NTLM");
return;
if (auth.startsWith("NTLM ")) {
byte[] msg = new sun.misc.BASE64Decoder().decodeBuffer(auth.substring(5));
int off = 0, length, offset;
String s;
if (msg[8] == 1) {
off = 18;
byte z = 0;
byte[] msg1 = {(byte)'N', (byte)'T', (byte)'L', (byte)'M', (byte)'S',
(byte)'S', (byte)'P', z,
(byte)2, z, z, z, z, z, z, z,
(byte)40, z, z, z, (byte)1, (byte)130, z, z,
z, (byte)2, (byte)2, (byte)2, z, z, z, z, //
z, z, z, z, z, z, z, z};
response.setStatus(response.SC_UNAUTHORIZED);
response.setHeader("WWW-Authenticate", "NTLM "
+ new sun.misc.BASE64Encoder().encodeBuffer(msg1).trim());
return;
else if (msg[8] == 3) {
off = 30;
length = msg[off+17]*256 + msg[off+16];
offset = msg[off+19]*256 + msg[off+18];
s = new String(msg, offset, length);
//out.println(s + " ");--------------------------> here getting system_name
else
return;
length = msg[off+1]*256 + msg[off];
offset = msg[off+3]*256 + msg[off+2];
s = new String(msg, offset, length);
//out.println(s + " ");
length = msg[off+9]*256 + msg[off+8];
offset = msg[off+11]*256 + msg[off+10];
s = new String(msg, offset, length);
out.println("Hello <span style='position:relative; width:190;"
+ " height:10;filter:glow(Color=#009966,Strength=1)'>");
out.println(s + "</SPAN>");----------------------------------->here getting loginname.
%>
form this code i was able to get systemname & username.
How can i get password?
Thanks

Similar Messages

  • HOW CAN I GET USERNAME,PASSWORD,HOST STRING?

    I have installed oracle 9i personal edition, when i tried to open sql plus, i was asked to fill username,password and host string. When i type anything it shows error message ora-12154.Is anyone can help me? Thanks

    The error you gave can appear for lots of reasons.
    You don't give any information about how the install
    went - did you check the logs for errors? Have you
    shut the machine down since you did the install?
    Are you actually running SQL*Plus on the same machine
    as the database? Is your database running? Can you
    connect using "/ as sysdba"? What hints that even
    a simple google search gives did you try?
    -- CJ

  • Reg : How can I get  Username and Password in FTP Server in HANA

    Hi All,
      Any one can you please guide me....How can i get username and Password of FTP Server in SAP HANA?
    Regards,
    Arjun

    Hi Arjun,
    Are you looking for external authentication(External ID option) in HANA Studio instead of logging by entering HANA User and Pwd(which is internal)?
    You can look for the following Security guide which will give you some insight on this.
    http://help.sap.com/hana/hana1_sec_en.pdf
    Rgds,
    Murali

  • DDL statements in v$sql tables, how can i get the password.....

    Hi friends,
    When I create a user by issuing a statement like
    create user abcd identified by xyz;
    user created.
    but, how can i get the password without encryption in the v$XXXXX tables. Is there any dynamic table which stores the statement executed above in the current session, so that I can get the original password given.
    but when selecting the password by the query
    select password from sys.user$
    where name = 'abcd';
    Password
    ==========
    345ISDF9K4590DFJ35
    .........this is not my password(yes it is!) but not understandable..,
    Anybody please, show me the right way or query..,
    Post-Query Thanx..
    Praveenkumar Talla (Pune, India)

    I would hope there is no way to get this data. I wouldn't want a mechanism to grab passwords out of the SGA. Passwords are stored encrypted in the database. If you need to know the password, run another 'alter user username identified by password' and make not of what you changed it to.

  • I have a wi fi network which is bell675, it is asking me for a password but i don't know it, how can i get a password

    how can i get a password for wi fi network BELL675

    There's no way anyone here will know the password to that network. If this is your own home network, the password would be whatever you set up on the WiFi router. If you've forgotten it, you'll have to reset the router. Consult the router documentation. If this is a commercial WiFi network you're trying to access, contact whoever runs the network.
    Regards.

  • HT1766 Hi I am trying to restore my iphone from the itunes back up and it is asking me for a password, I don't ever remember putting a password in. how do i get the password reset?

    Hi I am trying to restore my iphone from the itunes back and  it is asking me for a password, I don't ever remember putting a password in. how do i get the password reset?

    Marrtin S wrote:
    Hi I am trying to restore my iphone from the itunes back and  it is asking me for a password, I don't ever remember putting a password in. how do i get the password reset?
    You can't get it reset; if you could there would be no point in having it. If you have an encrypted backup there are two ways this could have happened:
    You checked "Encrypt Backup" in iTunes at some time in the past, either intentionally or by accident
    You have a corporate MS Exchange account and your Exchange administrator installed a security profile on your phone that requires the phone'a contents to be encrypted. This, in turn, requires the backup to be encrypted for obvious reasons.
    In either case you were prompted for a password the first time you backed up after whichever of these happened. So think about what you might have entered for a password at that time. Fortunately you get an unlimited number of tries. Other threads on this subject have shown that it is always a password known to the user, so it wasn't something made up by iTunes. Also, everyone who has figured it out has found it to be a different password type, so try your Apple ID password, your computer's login password, your WiFi password, your corporate domain password, etc. And try passwords that may have been changed since your first backup. As a last resort there is a professional password cracker available, but it isn't cheap - it's targeted at the law enforcement market - from Elcomsoft. There are also some scam password crackers available that don't actually work and possibly steal your information. It's likely that a developer of one or more of these will post a response with a link (possibly hidden) to their "product". So before clicking any links you might want to install the Web of Trust plugin that keeps track of scam sites and warns you. http://www.mywot.com.

  • I cannot access my itunes because i have forgotten the password. the email on the itunes is no longer active... HOW do i get the password when the email isnt working :(

    HOW do i get the password on my itunes when the email is no longer viable?
    no way to access that email any longer

    The following has instructions: If you forgot your Apple ID password
    If you cannot do any of those methods, then Apple ID: Contacting Apple for help with Apple ID account security

  • I lost my password and i could get into my phone, i tried but it said connect to itune. i did, but i did not get any result. please give me some advises how do i get my password back or reset with a new one?

    Ipjone6, silver, 64GB
    I lost my password and i could get into my phone, i tried but it said connect to itune. i did, but i did not get any result. please give me some advises how do i get my password back or reset with a new one?

    how to reset password:
    https://iforgot.apple.com/password/verify/appleid

  • HT201303 how do you get your password back if you forget it?

    How do you get your password back for the ipod? I need to know!  I forgot my password.  Is their a a way i can get it back by by my apple account? ! Please someone answer my question

    Locked Out, Forgot Lock or Restrictions Passcode, or Need to Restore Your Device: Several Alternative Solutions
    A
    1. iOS- Forgotten passcode or device disabled after entering wrong passcode
    2. iPhone, iPad, iPod touch: Wrong passcode results in red disabled screen
    3. Restoring iPod touch after forgotten passcode
    4. What to Do If You've Forgotten Your iPhone's Passcode
    5. iOS- Understanding passcodes
    6. iTunes 10 for Mac- Update and restore software on iPod, iPhone, or iPad
    7. iOS - Unable to update or restore
    Forgotten Restrictions Passcode Help
                iPad,iPod,iPod Touch Recovery Mode
    You will need to restore your device as New to remove a Restrictions passcode. Go through the normal process to restore your device, but when you see the options to restore as New or from a backup, be sure to choose New.
    You can restore from a backup if you have one from BEFORE you set the restrictions passcode.
    Also, see iTunes- Restoring iOS software.

  • HT5624 how can you get your password sent to your email address I do not want to change my password.

    How can you get your password sent to your email address I do not want to change my password.

    If you cannot remember the passcode for the Screen Lock, you will need to Restore the device...
    1)  Connect to iTunes on the computer you usually Sync with and Restore...
    http://support.apple.com/kb/HT1414
    2)  If necessary Place the Device into Recovery mode...
    http://support.apple.com/kb/ht4097
    Note on Recovery Mode.
    You may need to try this More than Once...  Be sure to Follow ALL the Steps...
    Once you have Recovered your Device...
    Re-Sync your Content or Restore from the most recent Backup...
    Restore from Backup  >  http://support.apple.com/kb/ht1766

  • How can i get my password if i forgot it?

    i forgot my password to my computer and i called apple and they told me to go onto this website. how do i get my password back?

    Here's one method to reset the password without the install disc:
    1. boot computer and hold the "apple" key and the "s" key.
    2. wait for terminal show
    3. release keys
    4. type without the quotes: "/sbin/mount -uaw"
    5. press enter
    6. type without the quotes: "rm /var/db/.applesetupdone
    7. press enter
    8. type without the quotes: "reboot"
    9. press enter
    This will let you create a new admin account when you reboot your computer.
    Also, without the discs, look at Mac OS X Tip - No Password, No Root, No CD? No Problem.
    http://www.macobserver.com/tip/2003/06/16.1.shtml
    Here is a way to get around not knowing the admin password on Macs.
    To reset your OS X password without an OS X CD you need to enter terminal and create a new admin account:
       1. Reboot
       2. Hold apple + s down after you hear the chime.
       3. When you get text prompt enter in these terminal commands to create a brand new admin account (hitting return after each line):
              * mount -uw /
              * rm /var/db/.AppleSetupDone
              * shutdown -h now
       4. After rebooting you should have a brand new admin account. When you login as the new admin you can simply delete the old one and you’re good to go again!
     Cheers, Tom

  • How do you get your passwords on itunes if your device is disabled?

    How do you get your password for your device on itunes?

    If you mean passcode, you can't get it from iTunes.  You have to follow one of the solutions listed at the bottom of this article: http://support.apple.com/kb/HT1212.

  • In iPhoto, when i try to email a photo using "share", I keep getting"username/password" not recognized. It used to work automatically before.

    I cannot email  a photo using iPhoto "share. I keep getting "username/password not recognized". I used to use this function all the time but all of a sudden, I keep getting this message.

    In iPhoto, open Preferences (under iPhoto in the menu bar) and click the "Accounts" tab on top.  Make sure your email account(s) is/are set up there correctly, just as they are in Apple's Mail.  Make sure the password in included.

  • How do i get the password to my restrictions?

    how do i get the password to my restrictions?

    You have to remember it... there's no way to retrieve it.  To clear it, you'll have to restore your iPhone as new, i.e. without your backup.  If you restore from your backup, you'll just restore the restrictions passcode.

  • How do I get the password for an old apple id, when I don't have access to that old email address, and it doesn't recognize my birthdate?

    How do I get the password for an old apple ID when I dont have access to the email address and it does not recognize my birthdate?

    Hi Attila528,
    Thanks for visiting Apple Support Communities.
    If you are not able to receive a rescue email to reset your security questions and password:
    You'll need to contact iTunes Store support to have your questions and answers reset.
    You can find the article with this information here:
    Rescue email address and how to reset Apple ID security questions
    http://support.apple.com/kb/HT5312
    After your password, security questions and answers are reset, I'd recommend providing a new rescue email address:
    You can edit or delete your rescue email address at My Apple ID. To edit your rescue email address:
    Navigate to My Apple ID using your web browser.
    Click "Manage your account"
    When prompted, sign in using your Apple ID and password.
    Click Password & Security
    You'll be asked to answer 2 of your 3 security questions before you can make any modifications. If you are unable to remember your answers, you can choose to send an email to your rescue email to reset your security questions.
    All the best,
    Jeremy

Maybe you are looking for

  • Passing values to a JSP file

    Help! This is a very trivial and simple problem but stupid me couldn't figure out. I am developing a web interface with a database. I retrieved some records with a recordset. Now I am passing the id value to the next jsp file. This is what my code lo

  • Ipod touch time of day restrictions

    I have a 4th gen ipod touch and I want to set up time of day restrictions, such that the device cannot be used during the restricted hours. I've looked quite a bit on the web and it appears that this functionality does not natively exist as I've desc

  • JNDI with TOMCAT4.0 to CLOUDSCAPE ? need explanation

    Hi All, I'm using TOMCAT4.0 and Cloudscape. I got below code 1,2,and 3. When I ran it, I can't look up the cloudscape database ? (I print out "************** null ***************") Why? It looks like there is no link between jdbc/books and cloudscape

  • Error with EJBs in oc4j

    All of a sudden Im getting this error in the oc4j deployment: Error: com.framework.business.bd.BusinessDelegateException: Error calling ServiceClassification EJB: com.framework.business.servicelocator.ServiceNotAvailableException: Could not connect t

  • German dates and "add iCal event" not working

    I have a german formatted date in a mail (like 01.08.2008 = October, 1. 2008) and Mail does recognize this as a date. But when I select "add iCal event", the popup shows the date 08.01.08 (= January, 8. 2008). This only happens with days <= 12. When