Skip to Content
Author's profile photo Former Member

KeePass and SAP-Logon

Some of you may know this: x systems, y clients and many more passwords you have to keep in mind. Furthermore there are more and more complex password rules, and remembering all these passwords seems to be impossible without any help.

Single-Sign-On is not available  and not planned in your company, so what do you do? I found a nice solution for this problem: KeePass

How does it work?

Some of you may already know KeePass. You may also noticed that you can enter a “URL” in every single entry:

http://sapxperts.files.wordpress.com/2012/05/kp01.png?w=494

One may have a look at note 103019 to see you can open a connection to your SAP systems with parameters. I use this command to connect to my SAP systems:

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

The parameters -system and –client need to be configured once per system. The username and password are taken from your KeePass-Database. Save your settings and press CTRL+U to directly jump into your system. Great, isn’t it?

I hope I could at least help some people to handle their passwords a little easier now.

Kind regards

Jann

Assigned Tags

      18 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Alessandro Spadoni
      Alessandro Spadoni

      useful,I use this nice solution every day in addition with dropbox

      there is an old blog of Peter Langner on the same argument

      Author's profile photo Peter Langner
      Peter Langner

      Here is the link to the blog: http://scn.sap.com/community/gui/blog/2012/01/29/using-keepass-instead-of-sap-logon. You might find the discussion and the video helpful.

      Author's profile photo Former Member
      Former Member

      Sorry Peter, I didnt notice your blog is available here. Nevertheless I guess it was your blogpost that brought me to this idea and after using it for about one year now, I just wanted to share the knowledge with the people here.

      Thanks Peter!

      Author's profile photo Einar Eiríksson
      Einar Eiríksson

      Nice blogs both of you. Been using this for years now and can't live without Keepass. Although I did one thing differently, I defined an URL scheme override, sapgui and linked that to the sapshcut.exe, therefore no need to add it to the path variable and simple to move between machines as well, for instance the change in path when going from 32 to 64 bit, only need to update the URL Scheme override definition.

      Author's profile photo Peter Langner
      Peter Langner

      Hi Einar,

      thank you for your fee back. As you can see, we are also calling sapshcut.exe. Using a url scheme for the path is an nice idea. Could you please post an example of how you did it? It's more easy for the reader to implement it.

      Thanks in advance,

      Peter

      Author's profile photo Martin English
      Martin English

      Rather than cut-and-paste, there's a good description of how to define a "SAPGUI" URL scheme override at http://www.fundl.at/blog/2013/08/start-a-sap-gui-session-with-keepass/

      One tip that the link has that I didn't see jumping out at me on either this or the original post on this subject was that combining use of

      cmd://"{ENV_PROGRAMFILES_X86}/SAP/FrontEnd/SAPgui/SAPgui.exe"

      and

      -gui=/H/[SERVER]/S/32INSTANCE]

      means you don't need the system defined in your SAPLOGON.INI

      hth

      Author's profile photo Peter Langner
      Peter Langner

      Hi Martin,

      yes indeed, you do not need to define your system in SAP logon.ini unless it is needed e.g. by ABAP in Eclipse.

      An ABAP project is there created in relation to a system defined in the saplogon.ini file, which must also be present, if you want to logon to the system later. For ABAP in Eclipse you will soon also be able to use keepass (see Using KeePass to logon to a ABAP Project in ABAP in Eclipse).

      Cheers,

      Peter

      Author's profile photo TEAM VCEAA BASIS
      TEAM VCEAA BASIS

      Thank you very much.

      It is a  very useful functionality

      Author's profile photo Martin English
      Martin English

      You can also open a ssh session by launching Putty from Keepass with your credentials saved in Keepass.

      putty and keepass

      • Open keepass and create a new entry. In the title, put your server domain or ip.
      • make sure putty is in your Windows PATH so it can be launch from the command line. (if not you should be able to put the absolute path to putty in the command line above)
      • put the other credentials informations on your new Keepass entry
      • In the URL field, put this :

      cmd://putty -load "Default Settings" {TITLE} -l {USERNAME} -pw {PASSWORD}

      • click Ok to save.
      • Then, you can open your ssh session by pressing Ctrl+U or by right clicking on your new entry and by cliking on URL(s) > Open


      NOTE :
      You can see that we are loading the “Default Settings”. You can change the default settings from Putty. You can also load other settings by changing the name in the given command line.

      Author's profile photo Peter Langner
      Peter Langner

      Hi Martin,

      thank you for sharing your experience.

      Peter

      Author's profile photo Christian Punz
      Christian Punz

      hi Jann,

      thx for the post! I used keepass successfully since a long time under SAPGUI 7.30.

      Now with 7.40 it seems that Ctrl+U (or double-click on cmd://sapshcut...) does it's job only for system-connections from the central SAPUILandscape.xml and does not work for the local one.

      Do you experience the same issues?

      Being on SAPGUI 7.40 PL2 Hotfix 2.

      Any hints appreciated.

      br

      chris

      Author's profile photo Former Member
      Former Member

      Hello Christian,

      I’m living the same issue on SAP Gui 7.4 patch level 1 with configuration on XML file

      It was working on the same Gui but with saplogon.ini

      Now, I have to switch to XML

      Do you have any update on this topic?

      Thank you

      Author's profile photo Peter Langner
      Peter Langner

      Hi Habib,

      for me it works all fine. If you are facing any issues, please discribe them here in detail, so that we can try to help you out.

      Peter

      Author's profile photo Helal Habib
      Helal Habib

      Hi Peter,

      I'm using the keepass 2.3 with the following settings

      example of an entry :

      cmd://sapshcut  -maxgui -system=PM1 -client=020 -user={USERNAME} -pw={PASSWORD}

      the SID is already visible on my SAP Gui (740 Patch 1)

      SAPGui_Entry.png

      SAP Gui Config File location :

      Local Config File.png

      Error message show

      Error.png

      Thank you

      Habib

      Author's profile photo Helal Habib
      Helal Habib

      Hello Peter,

      I found a solution by adding a the new parameter -sysname="SAP SYS NAME"as set on sapshcut  help and it's working fine

      Thank you

      habib

      Author's profile photo Cornel-loan Coser
      Cornel-loan Coser

      Hi,

      If the problem is not solved yet i have used the following command URL for 7.40 and works:
      cmd://"C:\Program Files (x86)\SAP\FrontEnd\SAPgui\SAPgui.exe" /SHORTCUT="-gui -system=XXX -client=YYY -user={USERNAME} -pw={PASSWORD} -maxgui"

      Regards,

      Cornel.

      Author's profile photo Marko Graf
      Marko Graf

      Hello,

      now there is e KeePass plugin available.

      It offers a more convenient way to logon to SAP systems. See...

      http://keepass.info/plugins.html#keesaplogon

      Regards,

      Marko

      Author's profile photo Joao Silveira
      Joao Silveira

      Hi,

      how can I use the SAP logon Keepass, when I am using Connection Type: Group/Server Selection?

      The solution above doesn't work.

       

      In my case, I want to start automatically the S4H [S4HANA]

       

       

       

       

      Thanks,

      Joao