2

Password reset cross-client

 1 year ago
source link: https://blogs.sap.com/2023/03/27/password-reset-cross-client/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
March 27, 2023 3 minute read

Password reset cross-client

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.

Bild2-5.png 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.
Bild2.2.png Bild3-4.png
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
Bild4-4-1.png
Bild1-21.png
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
Bild6-4.png
Bild7-3.png
Information, that the PW is set Client 000 Login (Possibly set new password, since 90 days have passed)
Bild8-3.png
Bild9-2.png
Logon works fine in Test System. Transport in Prod… Transport is running..
Bild10-1.png Bild11-1.png
Transport is done. Program imported into productive system
Bild12-1.png
Bild13-1.png
SE16N Initial password read from DDIC. Password is hexadecimal encrypted. Login to client 100 with DDIC and new password
Bild14-1-1.png
Bild15-1.png
Assign new password (90 days policy) Set the password in the ZPWDEL program and execute the program. Save.
Bild16-1.png Bild17-1.png
PW changed. Logon to client 000 with user DDIC and new password.
Bild19.png
Bild18.png
Successful registration. Successful registration.

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK