Retrieving a list of "orphan" ids

I have a situation where I would like to retrieve a list of ids on AIX 5.3 server, which do not have proper gecos information. The need is to fix all of these ids before it gets flagged as an audit exposure. Can someone please help me with a command/script to retrieve this list?

G

 ps -ef | awk '/defunct/ {print $2}' 

This is giving me a number as the output. I would like to have a list of user ids on the system without gecos info. Please help.

G

You mean if the 5th field in /etc/passwd is empty?

awk -F: '$5==""' /etc/passwd
1 Like