Application Development Blog Posts
Learn and share on deeper, cross technology development topics such as integration and connectivity, automation, cloud extensibility, developing at scale, and security.
cancel
Showing results for 
Search instead for 
Did you mean: 
marcobuescher
Active Contributor
Hello,

 

I had a request that a client requested a client copy. Unfortunately the passwords of the users SAP* and DDIC in client 000 could not be found anymore. So that the system copy could still be performed I decided to perform the following workaround. The program for this was a find from the net, the source is mentioned.

 



















































































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.
At first you need this Program. Program code.
Client 100: SE16N - Table USR02 - Read HEX value. Open the table USR02, where you will find the initial password of the user encrypted as HEX value. Client 100 - Change DDIC password
Client 100 control HEX value was new and overwritten Client 100 - open Programm ZPWDDEL,  Enter User, Mandant, Set Flag X as explained in the Program code. HEX value - Save
Information, that the PW is set Client 000 Login (Possibly set new password, since 90 days have passed)
Logon works fine in Test System. Transport in Prod... Transport is running..
Transport is done. Program imported into productive system
SE16N Initial password read from DDIC. Password is hexadecimal encrypted. Login to client 100 with DDIC and new password
Assign new password (90 days policy) Set the password in the ZPWDEL program and execute the program. Save.
PW changed. Logon to client 000 with user DDIC and new password.
Successful registration. Successful registration.

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.
3 Comments