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
Original Message:
Sent: Fri July 07, 2023 09:21 AM
From: David Taylor
Subject: Service Account Cannot Access All User Profiles
We have a service account--ABCGEODB--used from an external server to pull from qsys2.user_Info. Recently, we have noticed that newly created user profiles are not on the list. When someone with *ALLOBJ ran the query from the IBM i--THISSERVER--all expected records were on the list. When I ran the query with my more limited access, I was missing two users. When I tried to display one of them from a command line, I saw Not authorized to user profile ABCTDUNC. We believe we simply need to add some special authority to the service account, which we can test with my account. We are at a loss as to which special authority to add.
Thank you for your input.
select * from qsys2.user_Info
where authorization_name like '%ABC%'
and supplemental_group_List like '%DEFGHIJ%'
order by 1
;
------------------------------
David Taylor
------------------------------