I thought REFOBJ(ABCGEODB) REFOBJTYPE(*USRPRF) was a unique way to solve this. I would have thought you would have done the following instead: USER(ABCGEODB) AUT(*OBJOPR *READ)
The reason this concerns me is that ABCGEODB now has all the authority to those profiles as he does to his own. Including the ability to change their passwords, etc. However if you had used USER(ABCGEODB) AUT(*OBJOPR *READ) instead then that user would only be allowed to read it. Tested with the following:
CRTUSRPRF USRPRF(DUMMY) PASSWORD(...)
Signed on as DUMMY. Tried sql
select * from qsys2.user_Info
where authorization_name like '%ROB%'
and no rows returned.
Then I ran
GRTOBJAUT OBJ(ROB) OBJTYPE(*USRPRF) USER(DUMMY) AUT(*OBJOPR *READ)
Then I signed back on as dummy and tried the sql and it worked.
Then I promptly deleted DUMMY.
------------------------------
Robert Berendt IBMChampion
------------------------------
Original Message:
Sent: Tue July 11, 2023 08:12 AM
From: David Taylor
Subject: Service Account Cannot Access All User Profiles
By this time this question was reviewed and posted, another group where I posted the question recommended looking at the user profile object authority. We found that indeed the working profiles had one set of object authorities assign and the failing profiles were missing one or two of the authorities. We used the grant object authority from the service account to the failing accounts and resolved the problem. Thanks for the input.
GRTOBJAUT OBJ(ABCTDUNC) OBJTYPE(*USRPRF) REFOBJ(ABCGEODB) REFOBJTYPE(*USRPRF)
------------------------------
David Taylor
------------------------------