Blogs

Peter Langner

Using KeePass Instead of SAP Logon
Peter Langner Active Contributor Bronze: 250-499 points
Business Card
Company: ADventas Consulting
Posted on Jan. 29, 2012 01:23 AM in ABAP, Open Source

URL: http://keepass.info/

Subscribe.Subscribe
Print. Print
Permalink Permalink
Share

Together with Renald Wittwer I am preparing SAP Inside Track 2012 in Hamburg. Instead of the usual InnoJam we decided to create something new, which we called “Solution Jam” (short: SolJam). The idea is to present within 8 minutes innovative solutions / ideas / tools with or on top of SAP technology. I decided to show the participants how I use KeePass instead of SAP Logon.

As soon as I had posted the title, Uli Burner came up with I am very interested in your #sithh soljam topic “keepass instead of sap login” - any information about this available yet? and also Gregor Wulf was interested. Both managed to find out themselves before I could answer – only knowing the title was already a benefit for them.

Since a good story can always be told twice, I decide to write this blog even before I am going to show it to you in May.

1. The Open Source Software KeePass

So how did I came across this? Well, being a busy consultant my SAP Logon is flooded with system entries and I somehow had to remember all these passwords. The most  people I know use either more or less the same password for all the systems or they use something like excel where they keep their passwords protected with a master password.

Both ways of doing it are not very secure. Since I have to remember not only the user an passwords of the SAP systems, but also of a lot of websites and other applications, I was very happy to find this excellent open source software KeePass, a light-weight and easy-to-use password manager.

You can create different databases, each of them protected with a master password. It also allows to create  (sub-) directories and the content is encrypted (see Figure 1 - KeePass - Main Screen).

image

Figure 1 – KeePass – Main Screen

If you enter an entry you have data fields for e.g. title, user name, password, quality of the password and URL of the application. If you enter the password, it is not shown. You have to repeat it, as if you would logon to a system (see Figure 2). But you can also switch to visible password (if nobody is looking over your shoulder).

Entry Screen

Figure 2 - KeePass Entry Screen

2. How to Logon to a SAP System via KeePass

As you can see in the screenshots I have used the URL field to connect to the SAP system. With command “cmd” you can call a program. The program I am calling is SAP Shortcut (sapshcut). It is in the same directory as saplogon. Maybe you have to extend the path, if the program is not found. SAP Shortcut has a lot of parameters, which are all described in sapnote 103019.

What I have entered is the following:

cmd://sapshcut -system=NSP -client=100 -user={USERNAME} -pw={PASSWORD} –maxgui

The parameters have the following meaning:

  • system - System name
  • client - The client you want to login to
  • user - Your username. The “{USERNAME}” is a feature of KeePass to refer to the user name you have entered in the KeePass entry.
  • pw - Your password. The “{PASSWORD}” is a feature of KeePass to refer to the password you have entered in the KeePass entry.
  • language - The language you want to logon with (I omitted that).
  • maxgui - Maximize SAPGUI after login

If you select the entry and click on the link shown in the lower area of the main screen, you are immediately logged into the selected system.

Together with Renald Wittwer I am preparing SAP Inside Track 2012 in Hamburg. Instead of the usual InnoJam we decided to create something new, which we called “Solution Jam” (short: SolJam). The Idea is to present within 8 Minutes innovative solutions / ideas / tools with or on top of SAP technology. I decided to show the participants how I use KeePass instead of SAP Logon.
As soon as I had posted the title, Uli Burner came up with I am very interested in your #sithh soljam topic “keepass instead of sap login” - any information about this available yet? and also Gregor Wulf was interested. Both managed to find out themselves before I could answer –only knowing the title was a benefit for them.
Since a good story can always be told twice, I decide to write this blog even before I am going to show it to you in May.
Open Source Software Keepass
So how do I come across this? Well, being a busy consultant my SAP Logon is flooded with system entries and I somehow had to remember all these passwords. The most  people I know use either more or less the same password for all the systems or they something like  Excel where they keep their passwords protected with a master password. Both ways of doing it are not very secure.
Since I have to remember not only the User an passwords of the SAP systems, but also of a lot of websites and other applications, I was very happy to find this excellent open source software KeePass, a light-weight and easy-to-use password manager.
You can create different databases, each of them protected with a master password. It also allows to create  (sub-) directories and the content is encrypted (see Figure 1 - KeePass).
 
Figure 1 – KeePass – Main Screen
If you enter an entry you have data fields for e.g. title, user name, password, quality of the password and URL of the application. If you enter the password, it is not shown. You have to repeat it, as if you would logon to a system (see Figure 2). But you can also switch to visible password (if nobody is looking over your shoulder).
 
Figure 2 - KeePass Detail Screen
How to Logon to a SAP System via KeePass
As you can see in the screenshots I have used the URL field to connect to the SAP System. With command “cmd” you can call a program. The program I am calling is SAP Shortcut (sapshcut). It is in the same directory as saplogon. Maybe you have to extend the path, if the program is not found.   SAP has a lot of parameter, which are all described in sapnote 103019.
What I have entered is the following:
cmd://sapshcut -system=NSP -client=100 -user={USERNAME} -pw={PASSWORD} –maxgui
The parameters have the following meaning:
•    System – system name
•    Client – the client you want to login to
•    User – your username. The “{USERNAME}” is a feature of KeePass to refer to the user name you have entered in the KeePass entry
•    Pw – your password. The “{PASSWORD}” is a feature of KeePass to refer to the password you have entered in the KeePass entry.
•    Maxgui – Maximize SAPGUI after login
If you select the entry and click on the link shown in the lower area of the main screen, you are immediately logged into the selected system.
Together with Renald Wittwer I am preparing SAP Inside Track 2012 in Hamburg. Instead of the usual InnoJam we decided to create something new, which we called “Solution Jam” (short: SolJam). The Idea is to present within 8 Minutes innovative solutions / ideas / tools with or on top of SAP technology. I decided to show the participants how I use KeePass instead of SAP Logon.
As soon as I had posted the title, Uli Burner came up with I am very interested in your #sithh soljam topic “keepass instead of sap login” - any information about this available yet? and also Gregor Wulf was interested. Both managed to find out themselves before I could answer –only knowing the title was a benefit for them.
Since a good story can always be told twice, I decide to write this blog even before I am going to show it to you in May.
Open Source Software Keepass
So how do I come across this? Well, being a busy consultant my SAP Logon is flooded with system entries and I somehow had to remember all these passwords. The most  people I know use either more or less the same password for all the systems or they something like  Excel where they keep their passwords protected with a master password. Both ways of doing it are not very secure.
Since I have to remember not only the User an passwords of the SAP systems, but also of a lot of websites and other applications, I was very happy to find this excellent open source software KeePass, a light-weight and easy-to-use password manager.
You can create different databases, each of them protected with a master password. It also allows to create  (sub-) directories and the content is encrypted (see Figure 1 - KeePass).
 
Figure 1 – KeePass – Main Screen
If you enter an entry you have data fields for e.g. title, user name, password, quality of the password and URL of the application. If you enter the password, it is not shown. You have to repeat it, as if you would logon to a system (see Figure 2). But you can also switch to visible password (if nobody is looking over your shoulder).
 
Figure 2 - KeePass Detail Screen
How to Logon to a SAP System via KeePass
As you can see in the screenshots I have used the URL field to connect to the SAP System. With command “cmd” you can call a program. The program I am calling is SAP Shortcut (sapshcut). It is in the same directory as saplogon. Maybe you have to extend the path, if the program is not found.   SAP has a lot of parameter, which are all described in sapnote 103019.
What I have entered is the following:
cmd://sapshcut -system=NSP -client=100 -user={USERNAME} -pw={PASSWORD} –maxgui
The parameters have the following meaning:
•    System – system name
•    Client – the client you want to login to
•    User – your username. The “{USERNAME}” is a feature of KeePass to refer to the user name you have entered in the KeePass entry
•    Pw – your password. The “{PASSWORD}” is a feature of KeePass to refer to the password you have entered in the KeePass entry.
•    Maxgui – Maximize SAPGUI after login
If you select the entry and click on the link shown in the lower area of the main screen, you are immediately logged into the selected system.

Peter Langner  Active Contributor Bronze: 250-499 points is an experienced SAP project manager, business consultant and developer.


Comment on this articleAre you also using KeePass? What are your experiences?
Comment on this weblog
Showing messages 1 through 13 of 13.

Titles Only Main Topics Oldest First

  • Does KeePass work with EP?
    2012-02-15 06:51:33 T-Systems Budapest Business Card [Reply]

    Hi Peter,


    I have tried to automatically login to SAP NetWeaver Portal with KeePass but unfortunatly I was't successful.


    Here is my URL for starting:


    cmd://{INTERNETEXPLORER} http://{S:IP}:5{S:INSTANCE}00


    But ?sap-user={USERNAME}&sap-password={PASSWORD} seems to have no effect.


    Do you have a solution for this?


    Best regards
    Gerrit

    • Does KeePass work with EP?
      2012-02-15 23:55:20 Leo van Hengel Business Card [Reply]

      Hi Gerrit,


      For automatic login to the Portal with KeePass you can use the following url:


      http://<hostname>:<port>/irj/portal?j_user={USERNAME}&j_password={PASSWORD}


      Kind regards,
      Leo

    • Does KeePass work with EP?
      2012-02-15 13:12:33 Peter Langner Business Card [Reply]

      Hi Gerrit,
      cool that you want to use KeePass as well! The way you have choosen your URL is not correct. If you start with "cmd", then it means that you want to call a program and pass commandline parameters to it. You should use "Http:" to call a URL in a browser. E.g. "http://{S:IP}:5{S:INSTANCE}00...".


      I don't know EP and therefore I can't tell you how the URL must be build and if you can put the username ans password to it. You can follow Gregors suggestion and try the url. If it is valid, you can enter it to key pass.


      Another way to achieve want you want is to use Keepass powerfull autotype function. Please read the helpfile of KeePass.


      Have fun,
      Peter

    • Does KeePass work with EP?
      2012-02-15 11:29:54 Gregor Wolf Business Card [Reply]

      Hi Gerrit,


      have you tried to logon to the NetWeaver Java Stack using this URL when you manually put it into the Address Bar? Does that work?


      Best regards
      Gregor

  • Repeated systems IDs
    2012-02-03 08:09:17 Marshal Oliveras Business Card [Reply]

    Hi, I know this "trick" since a lot of time but I don't have a solution when I've got more than one system with the same ID in the SAP GUI.


    Keepass always access the first system that he found and I don't know how to specify one or another.

    • Repeated systems IDs
      2012-02-03 09:09:28 Peter Langner Business Card [Reply]

      Hi Marshal,


      thank you for your comment. Firt of all this is not a problem of KeePass, but of SAPshortcut. It has no parameter to pass the instance number. If you have two (or more) systems with the same system name you can specify the target system using the description in the SAPLogon.


      You have to use one of the following parameters: -sysname="SID [MyGroup1]" or -desc="SID [MyGroup1]". (See the above mentioned note section 2.2c) Please let me know, if has worked for you.


      Peter

  • Works also great for SAP Web Applications
    2012-01-29 23:43:34 Gregor Wolf Business Card [Reply]

    Hi Peter,


    using KeePass with URL's allows also an easy use with SAP Web Applications like the CRM WebUI. Here is a sample URL:


    http://<Server-FQDN>:<port>/sap/bc/bsp/sap/crm_ui_start/default.htm?sap-client=002&sap-sessioncmd=open&sap-user={USERNAME}&sap-password={PASSWORD}&sap-language=DE


    Best regards
    Gregor

  • Does it work with SAP GUI 7.20?
    2012-01-29 03:30:09 Gregor Wolf Business Card [Reply]

    Hi Peter,


    I've used the variant described by Florian Keller at SAP-GUI Anmeldung automatisieren mit KeePass. Unfortunately this solution requires that the need entry is selected in KeePass. So your solution is very elegant as you can start the connection from within KeePass. But with SAP GUI 7.20 SP 10 Hotfix 1 I get the error message "Name or Password incorrect". That also happens when I run SAPSHCUT from the command line.


    Hope you have a tip.


    Best regards
    Gregor

    • Does it work with SAP GUI 7.20?
      2012-01-29 20:09:53 Roger Beach Business Card [Reply]

      @Gregor


      I had the same issue and tried removing the -maxgui and it worked. I then moved -maxgui closer to the beginning of the URL and it also worked.


      cmd://sapshcut -maxgui -system=HT1 -client=240 -user={USERNAME} -pw={PASSWORD}

    • Does it work with SAP GUI 7.20?
      2012-01-29 11:27:23 Peter Langner Business Card [Reply]

      Hello Gregor,


      I am pleased, that you find my blog helpful.


      Regarding your question: yes it runs with SAP GUI 7.20. I am currently using also using Patch 10 Hotfix 1 and everything runs fine. Also lower versions are not problem (I am using KeePass since two years in this way).


      The message you have mentioned normaly occurs, if the username or password is wrong. Please check, that they are correct in KeePass resp. in the commandline and that there is no whitespace somewhere.


      Please let me know, if you could solve your problem.


      Regards
      Peter


Showing messages 1 through 13 of 13.