Skip to Content
Technical Articles
Author's profile photo Marco Büscher

How to reset Passwords from SAP* and DDIC

As an SAP consultant or administrator, you may be familiar with the DDIC user, which plays a key role in your SAP system. The DDIC user has extensive privileges and is responsible for managing the database and other important tasks. However, there may be times when you need to reset the password for the DDIC user, whether due to security concerns or simply because of a forgotten password.

In this blog post, we will give you a simple guide on how to reset the password for the DDIC user in your SAP system. We will go step by step and show you how to perform this important procedure safely and effectively.

However, before we dive into the details, it is important to note that resetting the password for the DDIC user is a sensitive task and requires appropriate precautions. Make sure you have the necessary permissions and that you understand the impact this operation will have on your SAP system.

Now that we’ve covered the basics, without further ado, let’s dive into how to reset the password for the DDIC user in SAP. Just follow the steps we present and you will be able to restore access to your DDIC user in no time.

REPORT ZPWDDEL.
**************************************************
* *
* Dieses Programm setzt die Paßworthistorie *
* zurück, so daß ein User sein altes Paßwort *
* weiter benutzen kann. *
* *
* 21.09.05 *
* Ergänzung für ein verlorenes Passwort *
* Mandant = Mandant, wo das Passwort verändert *
* werden soll. *
* Modify = Hier ein X setzen, wenn verändert *
* werden soll. *
* Hexpass = Verschlüsseltes Passwort des gleichen*
* Users aus einem anderen System *
*————————————————*
* gefunden im Netz *
* Original von:IMRE KABAI *
**************************************************
TABLES: USR02.
PARAMETERS: USER LIKE USR02-BNAME,
Mandant LIKE USR02-MANDT,
Modify(1) type c,
HexPass LIKE USR02-BCODE.SELECT * FROM USR02 client specified WHERE BNAME = USER
and Mandt = Mandant.
ENDSELECT.IF SY-SUBRC = 0.
if Modify = ‘X’.
usr02-bcode = Hexpass.
usr02-uflag = ‘0’.
update usr02 client specified.
write: / ‘Passwort geändert.’.
else.
USR02-OCOD1 = USR02-OCOD2 = USR02-OCOD3 =
USR02-OCOD4 = USR02-OCOD5 = USR02-BCODE.
usr02-bcda1 = usr02-bcda2 = usr02-bcda3 =
usr02-bcda4 = usr02-bcda5 = usr02-erdat.
MODIFY USR02.
write: / ‘Paßworthistorie erfolgreich zurückgesetzt!’.
endif.
ELSE.
WRITE: / ‘Benutzer nicht vorhanden!’.
ENDIF.
Client 800: SE16N – Table USR02 – Read HEX value Client 800 – Change DDIC password
Client 800 control HEX value was overwritten Client 800 – Enter HEX value – Save
PW set Client 000 Login (Possibly set new password, since 90 days have passed)

 

Assigned Tags

      3 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Sandra Rossi
      Sandra Rossi

      So, your blog post is about copying DDIC password from the mandant where you run SE16 to get the HEX code of password (USR02-BCODE), to the mandant typed in field MANDANT (provided that MODIFY checkbox is selected).

      + if I understand well: if the MODIFY checkbox is NOT selected, the user will be able to continue to use his old password (in case the user is asked to change password after given number of days, run the program then log in again with and won't be asked to change password again).

      NB: for non-German speakers, texts translated to English:

      REPORT ZPWDDEL.
      **************************************************
      *
      * This program sets the password history back so that 
      * a user can continue to use his old password.
      *
      * 21.09.05
      * Supplement for a lost password
      * Client = Client where the password is to be changed.
      * Modify = Put ​​an X here if you want to change Hexpass = Encrypted password of the same user from another system
      *————————————————*
      * Found on the Web
      * Original by: IMRE KABAI
      **************************************************
      TABLES: USR02.
      PARAMETERS: user      LIKE usr02-bname,
                  mandant   LIKE usr02-mandt,
                  modify(1) TYPE c,
                  hexPass   LIKE usr02-bcode.
      SELECT * FROM usr02 CLIENT SPECIFIED 
          WHERE bname = user
            AND mandt = mandant.
      ENDSELECT.
      IF sy-subrc = 0.
        IF modify = 'X'.
          usr02-bcode = hexpass.
          usr02-uflag = '0'.
          UPDATE usr02 CLIENT SPECIFIED.
          WRITE: / 'Password changed.'.
        ELSE.
          usr02-ocod1 = usr02-ocod2 = usr02-ocod3 =
              usr02-ocod4 = usr02-ocod5 = usr02-bcode.
          usr02-bcda1 = usr02-bcda2 = usr02-bcda3 =
              usr02-bcda4 = usr02-bcda5 = usr02-erdat.
          MODIFY usr02.
          WRITE: / 'Password history successfully reset!'.
        ENDIF.
      ELSE.
        WRITE: / 'User does not exist!'.
      ENDIF.
      Author's profile photo Matthew Billingham
      Matthew Billingham

      An 18 year old program. Does it even still work?

      Author's profile photo Sandra Rossi
      Sandra Rossi

      I guess the OP has tried... But at least the ABAP version where it has been run successfully should be indicated.