cuserid(3) uses getlogin(3). getlogin(3) uses /etc/utmp to determine userid from control terminal of process. This can be confused by several causes. The /etc/utmp file may be damaged. The control terminal may belong to another user. The process may not have a control terminal. Randy Herber, herber at fnalf.fnal.gov