[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 'who' do not let me know which user is loged in since names are cute

From: Bob Proulx
Subject: Re: 'who' do not let me know which user is loged in since names are cuted 8 characters
Date: Thu, 2 Nov 2006 22:16:20 -0700
User-agent: Mutt/1.5.9i

Andreas Schwab wrote:
> Michelle Konzack <address@hidden> writes:
> > Is it possibel to add an option to "who" to show the full ${LOGNAME}
> > of the ${USER} ?
> >
> > On my FileServer I have 17.000 ${USER} and 56 of them are shown only
> > as "michelle".  So I can not know, which "michelle" is loged in.
> If you only see part of the login name then that means that your system
> utmp file does not store than that.  There is nothing the who command can
> do about this.

You must have very long user names there.  That is not typical.

What I would do in that case would be to find the tty of the user and
then use ps to determine a process id of a process associated with
the tty then use the /proc pseudo-directory to list the name.

  ...see uid example 1003 on pts/1 with process id example 5770...
  ls -l /proc/5770
  ...read the user name from the ls long listing output...

I did not actually try that.  None of the machines that I have access
to have login names longer than eight characters.  So I don't know if
that would actually work.  But I think it would because the kernel
provides the /proc system as a pseudo filesystem and ls can list long
names from there.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]