Check if username and password passed are valid?

hi,
i've been asked to create a shell script that accepts a username and password which i then need to check against the database..
but the script won't be running any sql commands.. it will run another script that also accepts a username and password.
what i have so far
sqlplus -s $ora_user_pass << EOF
set echo off
set heading off
select sysdate from dual;
exit
EOF
ret_code=$?
if [ "$ret_code" -gt 0 ]; then
  echo "Invalid username and/or password"
  exit
else
....this works ok but it's a little dirty.. when the username and password are incorrect it shows a bunch of errors instead of the displaying "Invalid username and/or password".. this is coming from the sqlplus.
i'd appreciate any other suggestions.
thanks
allen

hi,
the sqlplus version is...
SQL*Plus: Release 8.0.6.0.0 - Production on Wed Apr 8 03:09:10 2009
(c) Copyright 1999 Oracle Corporation.  All rights reserved.the error that i don't want displayed in the screen is...
ERROR:
ORA-01017: invalid username/password; logon denied
Invalid option.
Usage: CONNECT <username> [AS SYSDBA|SYSOPER]
Invalid option.
Usage: CONNECT <username> [AS SYSDBA|SYSOPER]
unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus
Invalid username and/or passwordthanks
allen

Similar Messages

  • Check SAP username and password.

    Hello Experts,
    I  program a RFC-Function modul which check SAP logon-data.
    Import-parameter is username and password.
    I would like to know if the password is correct.
    Any help would be greatly appreciated.
    Thanks

    You can check the User/Password with this FM :
        CALL FUNCTION 'SUSR_LOGIN_CHECK_RFC'
             EXPORTING
                  BNAME            = BNAME
                  PASSWORD         = PASSWORD
             EXCEPTIONS
                  PASSWORD_EXPIRED = 0
                  USER_LOCKED      = 1
                  USER_NOT_ACTIVE  = 2
                  WRONG_PASSWORD   = 3
                  NO_CHECK_FOR_THIS_USER = 4
                  OTHERS           = 5.
        CASE SY-SUBRC.
          WHEN 0.  "that's what we know - it's ok
          WHEN 1.  MESSAGE E158(00) RAISING CHANGE_NOT_ALLOWED.
          WHEN 2.  MESSAGE E148(00) RAISING CHANGE_NOT_ALLOWED.
          WHEN 3.  MESSAGE E152(00) RAISING CHANGE_NOT_ALLOWED.
          WHEN 4.  MESSAGE E199(00) WITH BNAME RAISING CHANGE_NOT_ALLOWED.
          WHEN OTHERS.
                   MESSAGE E191(00) RAISING INTERNAL_ERROR.
        ENDCASE.

  • List of usernames and password who are same

    Hi,
    I have created several user with the default password same as the username. They are suppose to change their password. But Some of them have not changed their password.
    Now, I want the list of those database users who has the same password as thier username. How can I find it??
    I really appreciate if you help me.
    Thanks,
    Api

    Why don't you create some temporary db links using all username and same password as usernames. Then whichever db link allows you to select the data will be the one having same password. Following scripts with some tweaking might be helpful
    --creating db links
    begin
    for rec in (
    select * from dba_users where username NOT IN ('SYS','SYSTEM') --exclude other system users
    loop
    execute immediate 'create database link '||rec.username|| '_lnk connect to '||rec.username ||' identified by '||rec.username ||' using ''<DB_ALIAS>''';
    end loop;
    end;
    --printing usernames where username and passwrod are same
    declare
    v_name varchar2(100);
    begin
    for rec in
    (select * from dba_db_links where db_link like '%lnk')
    loop
    begin
    execute immediate 'select global_name from global_name@'||rec.db_link into v_name;
    dbms_output.put_line('This link uses default username and password '||rec.db_link);
    exception
    when others THEN NULL;
    end;
    end loop;
    end;
    Regards,
    Nitin

  • [BEGINNER] Checking for username and password in OID

    Hi all !
    I have the requirement to move USER/PASSWORD credentials from DB into OID. I have
    created the Organization structure and users now I need to validate user/password.
    I'd like to authenticate programmatically with JNDI Java Api so that the code is portable across different AS.
    The problem is that, when I issue a search against uid and password:
    Attributes matchAttrs = new BasicAttributes(true);
    matchAttrs.put(new BasicAttribute("uid", "[email protected]"));
    matchAttrs.put(new BasicAttribute("userpassword", "fmarchioni1"));
    NamingEnumeration results = ldapContext.search("dc=NDC,dc=Acme,dc=it",matchAttrs);
    I get as result:
    javax.naming.OperationNotSupportedException: [LDAP: error code 53 - Function not implemented
    I suppose it's not allowed to search the userpassword attribute, anyway how can I check the user credentials ?
    Thanks
    Francesco                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    The simple way to solve the problem is just to bind to the LDAP server with the login and the password that you want to check.
    The more complex is to see if you can get the password hash out of OID, hash the test password using the same algorithm and then compare the values.
    Best regards
    /Martin

  • Remote DVR Hates Me - Continues To Reject Valid Username And Password

    Hi all,
    I mistakenly posted this message in the programming forum by mistake, so I'm moving it here now (sorry about that):
    For the past few days, I've been unable to login to the Verizon remote DVR from both my iPhone and the web. It had been working fine for months, then all of a sudden, when I try to login, I get the dreaded 'login failed. please try again."
    My Username and Password still work fine for Verizon Central, but for some reason the remote DVR login page won't recognize them. I tried re-registering my username and password, but that didn't work. I don't have any periods (or other weird characters) in my username. And as I mentioned, it had been working fine for months and months. Very frustrating.
    I called tech support. They couldn't help (seemed baffled and ill equipped to solve this type of problem).  The rep told me that Verizon was having some trouble with remote DVR (yet he had NO information about what the problem was or if there was a fix in the works). Is this true, Verizon? Is there an internal issue? He said he was going to connect me to someone who could tell me more. I said great. Then he connects me and I get a recording that says, "you've reached a non-working number in the Verizon system ..." NICE! 
    Is anyone else out here having trouble logging in to their remote DVR?
    One thing I noticed, the login page looks different. There used to be  2 radio buttons: one for ".com" and one for ".net." I don't see those any more. I wonder if that's part of the problem.
    I appreciate any help. Thanks everyone. And again, sorry for the double post.

    Hi Guys,
    Thanks for taking the time to reply.
    TROYH72: Yes, I'm painfully aware that the "http://m.verizon.com/tv" url is for mobile devices. It used to work fine on my iphone, but it no longer does. It constantly rejects my username and password (which are both valid). FYI, that same url used to work from my computer as well. 
    PJL: Thanks for your suggestion. I tried deleting the cookies and clearing the browser cache. No luck. I really think this is a problem on Verizon's end for a couple of reasons:
    1. The login page looks different to me now. As I mentioned, there used to be radio buttons for .com and .net. Those are gone.
    2. I have the same problem logging on from my computer as I do from the iphone. Seems odd.
    3. I can log in to "http://www36.verizon.com/fiostv/web/," and some other Verizon urls, but I can't access my DVR once I'm logged in. The only way I can access my DVR remotely is to log in through "verizon.com"  and do it the roundabout way. But as I mentioned in a previous post, that's really cumbersome from a mobile device.
    4. Maybe most importantly, the remote DVR used to work perfectly! And now it doesn't work at all on my iphone ("Login failed. Please try again.") And it's wonky from the web. And I haven't changed anything on my end.
    Maybe it's a Mac thing. I'm running Macs as well as an iphone. I know that sometimes, Verizon and Macs don't play nicely together. I'm at a loss. And it doesn't look my Ticket is making any headway.

  • Check username and password

    Hallo,
    I have been working recently with netweaver.
    I should write a method that checks the username and password.
    Username and password are to be taken over by a logon.jsp.
    It would be very nice if someone could help me.

    Hi,
    Please check if the connection string is right and make sure the IIS application pool identity has enough permission to access database.
    For more information, please refer to the document:
    http://www.codeproject.com/Questions/328554/IIS-hosted-website-cannot-access-database
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Get DB Username and password from current connection

    Hi folks,
    I'm presuming this is something absurdly simple, i therefore offer my apologies in advance. my requirement is quite different from the very famous dynamic JDBC credentials example.
    I'm using Struts on a 10.1.2 implementation. We have numerous Oracle reports that we wish to call from Jdev (through a report server call). To provide the credentials to the Report server I need to provide the DB connection's username, password and SID. This I intend to do in a helper class in my web module.
    Is there a plain vanilla simple way of getting this done. I know "context.getApplicationModule().getTransaction().getConnectionMetadata().getUserName()" gives me the Database Username- just like that. Is there a similar way to obtain the password and SID as well. While getTransaction().getConnectionMetadata().getJdbcURL is also quite useful, how "for the life of me" do i get the password of the current DB connection (assuming I have an application module that is already connected). I basically wish to directly use connections from the application module directly without the need to manually specify/hard-code these credentials in my code.
    I've searched the forums and haven't been able to get the answer I was looking for (that or I;m searching in the wrong areas). Any help would be GREATLY appreciated.
    Cheers

    Hey Timo,
    thanks for that. I still have a couple of doubts.
    One the nature of the application is slightly different. we use independent usernames and passwords which are stored in the DB (different from DB username and password). The request(for the report-server call) comes only after the user is authenticated. Like you rightly said it's not a good idea to store the password and I'm pretty sure that option is completely ruled out.
    My questions is, given that the user already has an application module at hand which would mean he has a valid connection to "a" DB- (once again we have multiple DB scenario), I merely wish to use the information from the Connection that the application module is using to issue the request to the report server call. I take it the call to oracle reports server wouldn't accept a connect string, you necessarily have to provide the DB username/password and SID.
    My question now, is there anyway to obtain the password(or merely point my report server to this without requiring to store it) from the application module connection.
    I hope my query is clear, please let me know if what i'm saying needs to be clarified or doesn't make sense.

  • Access to InitialContext by username and password

    hi,
    I have implemented a web application, which gets resources via JNDI.
    I am accessing JNDI by username and password:
    Properties p = new Properties();
    p.put(Context.INITIAL_CONTEXT_FACTORY, "com.sap.engine.services.jndi.InitialContextFactoryImpl");
    p.put(Context.PROVIDER_URL, "localhost:50004");
    p.put(Context.SECURITY_PRINCIPAL, "username1");
    p.put(Context.SECURITY_CREDENTIALS, "password1");
    javax.naming.Context ctx = new InitialContext(p);
    Accessing the InitialContext works without any problems.
    My webapplication provides the functionality, that the user can relogin within the application.
    When the user pushes the relogin-button, the following code is run again
    Properties p = new Properties();
    p.put(Context.INITIAL_CONTEXT_FACTORY, guiConfig.getContext_factory());
    p.put(Context.PROVIDER_URL, "com.sap.engine.services.jndi.InitialContextFactoryImpl");
    p.put(Context.SECURITY_PRINCIPAL, "username2");
    p.put(Context.SECURITY_CREDENTIALS, "password2");
    javax.naming.Context ctx = new InitialContext(p);
    So I would like to check the access to JNDI by username and password again.
    Unfortunately I get an InitialContext EVEN WHEN MY PASSWORD IS WRONG.
    It looks like InitialContext is not cleared and access to JNDI is not checked by username and password again.
    Do I have to clear InitialContext before I relogin to the new InitialContext with the new username and new password; and if yes how can I do that?
    Thanks for your help in advance!
    Andreas
    Message was edited by: Andreas Putscher

    Hi Maksim
    I have tried the following source (within my webapplication):
    boolean isOldMethod = true;
    if (isOldMethod) {
         Properties p = new Properties();
         p.put(Context.INITIAL_CONTEXT_FACTORY, "com.sap.engine.services.jndi.InitialContextFactoryImpl");
         p.put(Context.PROVIDER_URL, "localhost:50004");
         p.put(Context.SECURITY_PRINCIPAL, username);
         p.put(Context.SECURITY_CREDENTIALS, password);
         ctx = new InitialContext(p);
    } else {
         ctx = new InitialContext();
         ctx.addToEnvironment(Context.INITIAL_CONTEXT_FACTORY, "com.sap.engine.services.jndi.InitialContextFactoryImpl");
         ctx.addToEnvironment(Context.PROVIDER_URL, "localhost:50004");
         ctx.addToEnvironment(Context.SECURITY_PRINCIPAL, username);
         ctx.addToEnvironment(Context.SECURITY_CREDENTIALS, password);
    Source code within on of my EJBs:
         public void setSessionContext(SessionContext context) {
              this.context = context;
    public UserAuthorization getUserProfile(String userName, String applicationName) throws CasablancaException {
         Principal prin = context.getCallerPrincipal();
    When I run oldMethod for INITIAL LOGIN and username+password are false,
         - immediately an exception is thrown
         -> THIS IS CORRECT BEHAVIOUR
    When I run newMethod for INITIAL LOGIN and username+password are false,
         - no exception is thrown,
         - context.getCallerPrincipal() returns "Guest" (I have logged in with user "TESTUSER", who is Adminstrator)
         -> WRONG BEHAVIOUR
    When I run oldMethod for RELOGIN and username+password are false,
         - no exception is thrown
         - context.getCallerPrincipal() return the old user (Context HAS NOT CHANGED to new user)
         -> WRONG BEHAVIOUR
    When I run newMethod for RELOGIN and username+password are false,
         - no exception is thrown
         - context.getCallerPrincipal() return the old user (Context HAS NOT CHANGED to new user)
         -> WRONG BEHAVIOUR     
    So in both cases (oldMethod and newMethod) no errors are thrown, but no Relogin to JNDI is performed.
    Do you have any more suggestions?
    Thanks for your help!
    Andreas

  • Username and password: OLAP???

    To export metadata "BRIDGE" from OWB to OLAP required username and password, these are the sys, system? or for OLAP_DBA Role? so my usrer OLAPSYS are looked? what I have to make to export data? now still doen't export just ask to make shure that I make a correct thing.
    Thanks

    thanks for answer.server is running. Analyzer and spreadsheet add_in can connectted to the server correctly.I installed the EAS not as as a Windows service,and i cann't even login to the EAS console,and check the EAS log i remember there is some wrong with connect the Mysql services.yesterday i installed the EAS as as a Windows service,and have connect to the server correctly mannually.I don't know why I can't install the EAS not as as a Windows service now.

  • How set  UserName and Password for HTTP Basic Authentication for a servlet

    Hi..
    How set UserName and Password for HTTP Basic Authentication for a servlet in JBoss server?
    Using Tomcat i can do it .(By setting roles in web.xml, and user credintails in tomcat-user.xml).
    But i dont know how do it in JBOSS..
    I am using Netbeans and Eclipse IDEs.. Can we do it by using them also!?
    Thank u

    Hi Raj,
    You can do this by creating a Login screen for the users and check the authentication of each user in PAI i.e. PROCESS AFTER INPUT.
    Store the user information in a database table and check the username and password when the user enters it.
    You can display password as *** also. For this double click on input box designed for password and goto Display tab. Select Invisible in the list and check it.
      CASE sy-ucomm.
        WHEN 'BACK'.
          LEAVE PROGRAM.
        WHEN <fcode for submit>.
          SELECT SINGLE uname pwd
           FROM <DB table>
           INTO (user, pass)
           WHERE username = user AND
                   password = passwd.
          IF sy-subrc = 0.
    <Go to next screen for further processing>
          ELSE.
    <Display Error message and exit>
          ENDIF.
      ENDCASE.
    Regards,
    Amit
    Message was edited by:
            Amit Kumar

  • How to set username and password for a tcode ?

    Dear Gurus,
              Greets..................
    Pls provide me solution for my scenario. My program is module pool program.It has been assigned by a Tcode.when the end user enter the tcode in command box,I should display a small screen with username and password(****).If username and password is correct,it should allow the end user to execute that particular tcode.If not i should display warning message that he is not eligible to access that program.
    Thanks & Regards.
    Raj

    Hi Raj,
    You can do this by creating a Login screen for the users and check the authentication of each user in PAI i.e. PROCESS AFTER INPUT.
    Store the user information in a database table and check the username and password when the user enters it.
    You can display password as *** also. For this double click on input box designed for password and goto Display tab. Select Invisible in the list and check it.
      CASE sy-ucomm.
        WHEN 'BACK'.
          LEAVE PROGRAM.
        WHEN <fcode for submit>.
          SELECT SINGLE uname pwd
           FROM <DB table>
           INTO (user, pass)
           WHERE username = user AND
                   password = passwd.
          IF sy-subrc = 0.
    <Go to next screen for further processing>
          ELSE.
    <Display Error message and exit>
          ENDIF.
      ENDCASE.
    Regards,
    Amit
    Message was edited by:
            Amit Kumar

  • IWeb username and password problem

    I've published a few sites now using iWeb, and just ran into this problem for the first time. The site I'm working on when published now asks for my apple username and password (my apple email address and apple password, for itunes etc etc) instead of the username and password I enter in iweb for password protecting the site. It says something like 'the username and password for your mobile me domain is incorrect. and when I put in my email address and apple password, it works. All my other sites that I set individual usernames and passwords for are working fine.
    Anyone know why it would be doing this? I did copy the pages from another site. could that be part of the problem?

    Have you found a good solution to your problem yet? I had an issue like you describe, where I thought I had to enter my MobileMe user/pass when prompted when browsing.
    The issue with passwords that I saw was when creating more than one site within a single domain.sites file. I have one public site without a password, and then the other several sites in this file do have passwords, and each of them has a different password. With this multi-site and multi-password configuration, I was confused why the passwords seemed to NOT be working.
    The result seems to be that the LAST site published is the user/pass used for ALL of the password protected sites. So right now, after editing a page in one of my private sites, I publish that site, and then I ALSO re-publish the site with the password that I want. This way at least I know the password being used. But it's a single password used for ALL the private sites.

  • I'm being asked for a password with the following statement: The proxy moz-proxy://192.168.30.5:800 is requesting a username and password. The site says: "moz-proxy://192.168.30.5:800"

    Here's an example of what happens when I cancel the username and password request:
    ERROR: Cache Access Denied
    Sorry, you are not currently allowed to request:
    http://cben.net/?
    from this cache because your username and password are incorrect or your user group does not have permission to web browse. Please check your username and password. They are case sensitive so make sure Caps Lock is not on.
    This happens 100% of the time.

    I have the same problem. It ask for all elements that proxt detects ("NetworkError: 407 Proxy Authentication Required").
    Solution "No proxy" not works because i aslo require internet.
    I have version 10.0.2 on windwos XP, and this happens to me since I update it. On chrome and ie works without prompt.
    I upload and example, this page calls facebooks elements (i can't acces facebook) and others, for each element prompt proxy is shown.

  • How to authenticate username and password?

    dear friends,
    i would be thankful if u could please help me out.
    i need to check the username and password in the database while the users login(say for example from login.jsp and the database is ORACLE.).
    reply awaited.
    thanks a lot.

    Well i assume the user fills in a form to login...then it's quite easy to get those parameters, to build an SQL query with this and to check if there is a match with an entry in the DB.

  • Why can't I sign into my iMessage with the correct username and password?, Why can't I sign into my iMessage with the correct username and password?

    Why can't I sign into my iMessage with the correct username and password?, Why can't I sign into my iMessage with the correct username and password?

    Are you trying to sign in with App Store Apple ID or, another ID that isn't associated with your device?
    Have you tried contacting Apple Support?
    http://www.apple.com/support/ipodtouch/contact/

Maybe you are looking for

  • I got this iPod yesterday, and I have a question

    Yes, this thing is great. can't recommend it highly enough. Oh yeah, the question: How do you erase things from the iPod?

  • How Do You Restart a Failing Load Plan

    If a Load Plan step fails, say because of some bad data or a bad join, I know how to correct the error and restart the failing step or the failing task in the Operator. How do you restart the failing Load Plan or any higher level step in the Operator

  • Xdp data not populated in PDF form

    Dear All, We currently develop XFA forms using Adobe LiveCycle Designer 8 (as part of acrobat professional). recently when clients upgraded to Adobe Reader 9.1 or 9.2, when they open an XDP file, the PDF appears without any data population as if the

  • All my Acrobat Windows are in Korean. How do I get it back to English?

    How do I re-configure my set-up for English. Korean is now the language in all the boses.

  • User not appearing in sharepoint

    I have added a user named 'kat' to the users tab.  She does not however show up in the sharepoint permissions list.  Instead, I get what looks to be a serial number showing up. See here: http://www.toolboxstrategies.com/test/OS-X-sharepoint-bug1.jpg