November 30, 2015

Chaging the password of an SAP Java user through database manually for Oracle


This was not intended to be a real post, so I'm sharing the log of how it was made in our case.
--UME_STRINGS the table that contains everything we need.
SQL> select count(*) from SAPSR3DB.UME_STRINGS;

--j_password attribute should be replaced with the password, and the password is a string first hashed as SSHA, and then encoded as Base64.

--Check what are the available attributes for all users called *ministrator 
select ATTR, VAL from SAPSR3DB.UME_STRINGS where PID like 'UACC%ministrator';


ATTR
--------------------------------------------------------------------------------
j_user
userid
PRINCIPAL_CREATION_DATE
CREATED_BY
lastpasswordchange
SecurityPolicy
unlockperson
unlockdate
j_password
ispassworddisabled
passwordchangerequired
unlocktext
lockdate
LAST_MODIFIED_BY
lockreason
islocked
lastfailedlogon
failedlogonattempts
PRINCIPAL_MODIFY_DATE


--Checking the values of each attribute
select PID,ATTR,VAL from SAPSR3DB.UME_STRINGS where PID like 'LDAP%ministrator';

--Checking the value of islocked attribute , as you can guess, when true the user is locked.
select PID,ATTR,VAL from SAPSR3DB.UME_STRINGS where PID like 'UACC%ministrator' and ATTR='islocked';

--Similar to LOCNT in ABAP
select PID,ATTR,VAL from SAPSR3DB.UME_STRINGS where PID like 'UACC%ministrator' and ATTR='failedlogonattempts';