The getpwuid() without any parameter is used to ask for any user having UID(0).
UNIX process on z/OS issuing a getpwuid() get:
getpwuid() failed? message
Another view of the issue is when issuing su command, it gets:
getpwuid : Unable to get login profile for UID(0).
When a CEE dump is taken, the following information can be found:
errno information:
Thread Id .... 116A160000000001 Errno ...... 163 Errnojr .... 0B4F0808
This error means an extract error from a RACROUTE REQUEST=EXTRACT call to get OMVS segment.
The last two bytes of Errnojr are the TSS return code and the TSS reason code, here 08/08.
We don't have the SAF return code so the TSS return/reason code may have the following meaning:
The best thing in such case is to set an OMVS trace. It will give us the SAF return code and the user name (acid) which TSS can't extract the UNIX segment for. Also a TSS WHOH UID(0) will help.
Here you are the OMVS trace to set:
st set,id=testa,type=safp,dest=syslog,fmt=dump
nn CAS21A0I SPECIFY RACROUTE PARAMETERS, CANCEL, OR END
r nn,request=extract
nn CAS2100I Continue SECTRACE specification, CANCEL, or END
r nn,end
to list the saf trace definition, you can issue:
st display,id=testa
Let's see below an example of OMVS trace output:
CAS21D0I TRACEID: OMVSTRACE EVENT#: 00006626 CAS21D0I JOBNAME: MYJOBNAME USERID: MYUSERID ASID: 0067 CAS21D1I PROGRAM: *PATHNAM RB CURR: *PATHNAM APF: YES SFR/RFR: 4/8:8 CAS2200I RACROUTE REQUEST=EXTRACT,CLASS=(=>)'USER',RELEASE=1.9.2, CAS2200I SUBPOOL=229,BRANCH=NO,DERIVE=NO,DATEFMT=YYDDDF, CAS2200I ENTITYX=((=>)'TCPIP'), CAS2200I FIELDS=(STRUCTURE FLDSLIST,=>,02C064C4),FLDACC=NO, CAS2200I GENERIC=ASIS,MSGSP=0,MATCHGN=NO,TYPE=EXTRACT, CAS2200I WORKA=(STRUCTURE SAFWORKA,=>,7F57163C) CAS2203I FIELDS DATA AREA FOLLOWS CAS2204I 02C064C4 +000 00000001 C4C6D3E3 C7D9D740 *....DFLTGRP *
The SAF/RC/RSN code means user exist but he doesn't have an OMVS segment. And the user is TCPIP.
Like we know TCPIP exists and it is an UNIX user, he should have an OMVS segment. Furthermore the TSS WHOH UID(0) displays TCPIP on its output list.
Then if TSS can't extract UID(0) for TCPIP acid, it will be likely the OMVSTABS are corrupted for that acid. To reestablish them issue the following command:
TSS ADD(TCPIP) UID(0) TSS REM(TCPIP) UID(0) TSS MODI OMVSTABS TSS ADD(TCPIP) UID(0)