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.

Similar Messages

  • 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

  • [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

  • 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.

  • 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

  • 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 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.

  • 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

  • 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 check Username and Password

    hai
    in my application i'm navigating from Login page to Home Page .  in login page i have to check for particular user name and password let us say abc and abc.  if the user enters wrong username and password it should redirect to login page. is there any snippet of code

    Hi Sravan,
    Import this package in your login view
    com.sap.tc.webdynpro.progmodel.controller.MessageManager;
    And if your context attributes are Name and Password.And if you are navigating from LoginView to HomeView. Write the code given below inside your action event.
    String login=wdContext.currentContextElement().getName();
    String password=wdContext.currentContextElement().getPassword();
         if(login!=null && login.equalsIgnoreCase("XXX") && password!=null && password.equalsIgnoreCase("YYY"))
              wdThis.wdFirePlugToHomeView();
         else
    MessageManager msgMgr= (MessageManager) wdThis.wdGetAPI().getComponent().getMessageManager();
    msgMgr.reportException("Login failure.Pls check login details",true);
    Hope this will help you     
    Regards,
    Rajeev

  • Validation (check) Username and Password from the database

    I have a Login page in my website, username and password as a textbox not as a form, I have already save the admin username and his password in the database, now I need to check or validate these textboxes if  data entered to textbox  match the
    existing in the database then show a message box "Successful Login" if not "username or password invalid!!"
    Note : The website developed using c# Visual Studio Professional 2013
    Thank you

    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.

  • I cannot get into iCloud, it sites connection error. I am online otherwise. My username and password check out. Anyone else with a similar problem?

    I Cannot getinto iCloud, it sites connection error. I am online otherwise. My username and password check out. Anyone else with this problem?

    SUCCESS! I was trying to get in with Internet Explorer, and getting the error message.
    I switched over to FireFox, and connected immediately!

  • What are the username and password when i click the ICM of JavaEE5@SAP

    when i click the ICM of JavaEE5@SAP in the sapmanagement console mmc, It need i input the username and password for Web_admin, What are the username and password when i click the ICM of JavaEE5@SAP and which tools act the role as the VisualAdministrator of NetWeaver04s and NetWeaver2004s?
    thank you very much

    Hello Guoging,
    you can login to ICM with username Administrator and password abc123. That is described in the start.html file, which you can find in the unzipped Downloadpackage of SAP NetWeaver Java EE 5 Edition.
    You can use NetWeaverAdministrator(NWA) or config tool to configure this edition. NWA
    needs to be installed separately. If you have a default installation, go to
    C:SAPJP1JC00j2eeNWAdmin and execute the file install.bat. Ensure that NetWeaver is running, enter user Administrator und the Masterpassword you chose during installation and wait around 20 Minutes or more. NWA is started automatically after installation has finished in your webbrowser.
    For more information on NWA read the Administrationguide
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/806e75a0-0e01-0010-2587-fc518de8ac1a">Administration Guide</a>

  • SAP DB database username and password

    Hi!
    I'd like to connect to the SAP DB database by using the Database Manager application. The DB instance was installed with sapinst.exe and I've never got any username and password.
    What can I do?
    Thanks in advance!
    Kind regards,
    Igor Barbaric

    Hello!
    "control - control" was fine for a DBM user, but now I need an SQL user. I tried in SAPDB SQL Studio with SAP<sysid>DB and SAP<sysid> with the password entered in the installation process, but it doesn't work. In DB Manager -> Configuration -> Users I can see only default DBM users CONTROL and SUPERDBA.
    However, when the SAP system is up and running, in Information -> Sessions I can see 8 sessions of SAPDEV user. This is obviously an SQL user which SAP uses to connect to the database, but I don't know it's password.
    Is there some other default SQL user or a way to find out or change the SAPDEV's password (ofcourse, then I'd have to change it in SAP too, or otherwise it couldn't connect)?
    Thanks!
    Kind regards,
    Igor Barbaric

  • Sign in with username and password every time I want to check emails on my PC using iCloud?

    Signing in with username and password every time I want to check emails on my PC using iCloud
    Having convinced my parents to get rid of their old AOL account and sign up for iCloud to sync their new iPhone with their old PC running Windows 7, I thought I was on to a winner. All working OK but is there any other way to get into emails besides going on iCloud website and signing in with name and password everytime? Can it be set up as a Mail account directly like on a Mac? Or using Outlook or Entourage? Help! I'm not a PC person!!
    ELF

    If they have Win 7 or 8, and Outlook 2007 or newer then you can.
    Just download the iCloud Control Panel for Windows. Install and select the services you want (Mail Contacts and Calendars will appear in Outlook)

Maybe you are looking for