When in OMVS and issuing the su command to gain superuser status, UID(0), and follow that with the whoami command, I get the error "Error for uid: 0". What causes this error?
search cancel

When in OMVS and issuing the su command to gain superuser status, UID(0), and follow that with the whoami command, I get the error "Error for uid: 0". What causes this error?

book

Article ID: 25328

calendar_today

Updated On:

Products

ACF2 ACF2 - DB2 Option ACF2 for zVM ACF2 - z/OS ACF2 - MISC PanApt PanAudit

Issue/Introduction

Question:  

When in OMVS and issuing the su command to gain superuser status, UID(0), and follow that with the whoami command, I get the error "Error for uid: 0". What causes this error?

Answer:  

The OMVS SU command without additional parameters is used to change the user from an ordinary user to a superuser.
The WHOAMI returns the userid associated with the profile record for UID(0) from the ACF2 OMVS table.

From OMVS:

# su
# whoami
Error for uid: 0

The message "Error for uid: 0" is caused by the first profile in the list of UID(0) profiles not having an available logonid record associated with that profile record. This could be because the logonid is either not found, or is cancelled or suspended.

The following can be done to determine what ACF2 USER PROFILE entry with UID(0) is the first entry in the table that is causing the problem.

From TSO ACF:

ACF
show omvs user(0-0)
-- OPENEDITION MVS DISPLAY --
   -- OMVS USERS -- 
      UID          NAME 
 -------------   -------- 
   
   0             AAAATEST 
   0             ACFLID1 
   0             BPXAS 
   0             BPXOINIT 
  ....           ....

Then from TSO ACF do a LIST of the first entry in the table displayed from the above SHOW command.

ACF
SET LID
LIST  AAAATEST
(..... record not found .....
..... or record is cancelled or suspended .....)

At this point based on the results of the above LIST command, a site can decide if the logonid needs to be defined or unsuspended, or if the ACF2 OMVS USER PROFILE record should be deleted.

Environment

Release:
Component: ACF2MS

Resolution

-