Technical article 105191

who(C) reports "Error --- entry has ut_type of <num> when maximum is 9".

OpenServer 5.0.0OpenServer 5.0.2OpenServer 5.0.4OpenServer 5.0.5OpenServer 5.0.6OpenServer 5.0.7

Written · Last revised

Problem

When I run the who(C) command on my system, it returns this error:

who: Error --- entry has ut_type of <num> when maximum is 9

where the value of <num> can be any number higher than 9, for example, '12336'.

Cause

who(C) checks the entries in /etc/utmp and/or /etc/utmpx.
One of the entries is a variable called ut_type.  This variable
is documented in the reference manual for utmp(F) as being of
type short.  Further down the manual page you will see ut_type
can take a set of defined values, ranging from 0 to UTMAXTYPE,
where "UTMAXTYPE" is set to the value '9'.  Thus, the maximum
value ut_type can have is '9'.

Solution

The error message indicates that who(C) has found an entry in
either utmp or utmpx for ut_type that exceeds the defined maximum
value of '9'.  It is likely that either, or both, /etc/utmp or
/etc/utmpx have become corrupted.  What has caused this corruption
will need to be investigated if the corruption continues to occur.
A simple solution for removing the reported error message is to
remove or zero out both the /etc/utmp and /etc/utmpx files right
before shutting down.  These will be rebuilt again when the system
is rebooted.
NOTE:     /etc/wtmpx, which contains login history, can be truncated whilst the
          server is in multi-user mode.  Use who -x /etc/wtmpx to view this
          information.

From the Xinuos technical article database, record 105191. Reproduced with permission. The original is at www.sco.com/ta/105191, which is reachable but blocked from search engines.

Next step

Need this fixed rather than explained?

Tell us the release, what the system runs and what it is doing. We will reply by email with what we would do next.

  • You deal with the people who do the work
  • No obligation, and no upgrade required before we will help
  • We tell you plainly if something is not worth doing

Send an enquiry

We reply by email. If a server is down, say so in the first line. You can also write to help@scoexpert.com.