From: Rahul on 10 Aug 2010 23:02 I'm confused by my "ps aux" output. The owners of most processes are listed by name (as is typical). e.g. foouser 20644 0.0 0.0 90116 1924 ? S 21:49 0:00 sshd: foouser(a)pts/7 But there's one user who's always listed by her uid (512 in this case): 512 17068 0.0 0.0 90116 1876 ? S 18:16 0:00 sshd: baruser(a)pts/3 In the /etc/passwd file they look similar: foouser:x:502:100:foos Name:/home/foouser:/bin/bash baruser:x:512:100:bars Name:/home/baruser:/bin/bash What else could be causing this difference? I'm stumped! -- Rahul
From: Richard Kettlewell on 11 Aug 2010 06:30 Rahul <nospam(a)nospam.invalid> writes: > I'm confused by my "ps aux" output. The owners of most processes are > listed by name (as is typical). > > e.g. > foouser 20644 0.0 0.0 90116 1924 ? S 21:49 0:00 sshd: > foouser(a)pts/7 > > But there's one user who's always listed by her uid (512 in this case): > > 512 17068 0.0 0.0 90116 1876 ? S 18:16 0:00 sshd: > baruser(a)pts/3 > > In the /etc/passwd file they look similar: > > foouser:x:502:100:foos Name:/home/foouser:/bin/bash > baruser:x:512:100:bars Name:/home/baruser:/bin/bash > > What else could be causing this difference? I'm stumped! Perhaps username is too wide for the column. $ ps -ef|grep exim 101 2368 1 0 09:55 ? 00:00:00 /usr/sbin/exim4 -bd -q30m $ ps -e -o user:20,pid,ppid,c,stime,tty,cmd|grep exim Debian-exim 2368 1 0 09:55 ? /usr/sbin/exim4 -bd -q30m -- http://www.greenend.org.uk/rjk/
From: Rahul on 11 Aug 2010 13:11 Richard Kettlewell <rjk(a)greenend.org.uk> wrote in news:87tyn1fnlo.fsf(a)araminta.anjou.terraraq.org.uk: > Perhaps username is too wide for the column. > > $ ps -ef|grep exim > 101 2368 1 0 09:55 ? 00:00:00 /usr/sbin/exim4 -bd > -q30m $ ps -e -o user:20,pid,ppid,c,stime,tty,cmd|grep exim > Debian-exim 2368 1 0 09:55 ? /usr/sbin/exim4 -bd > -q30m > > Yup! That's it. Thanks! -- Rahul
From: J G Miller on 11 Aug 2010 13:37 On Wednesday, August 11th, 2010 at 17:11:51h +0000, Rahul wrote: > > Yup! That's it. Thanks! By ze vay, you do know that if you want to see the actual username rather than userid, you can create your own ps output format listing using the -o parameter. -o format user-defined format. format is a single argument in the form of a blank-separated or comma-separated list, which offers a way to specify individual output columns. The recognized keywords are described in the STANDARD FORMAT SPECIFIERS section below. Headers may be renamed (ps -o pid,ruser=RealUser -o comm=Command) as desired. If all column headers are empty (ps -o pid= -o comm=) then the header line will not be output. Column width will increase as needed for wide headers; this may be used to widen up columns such as WCHAN (ps -o pid,wchan=WIDE-WCHAN-COLUMN -o comm). Explicit width control (ps opid,wchan:42,cmd) is offered too. The behavior of ps -o pid=X,comm=Y varies with personality; output may be one column named "X,comm=Y" or two columns named "X" and "Y". Use multiple -o options when in doubt. Use the PS_FORMAT environment variable to specify a default as desired; DefSysV and DefBSD are macros that may be used to choose the default UNIX or BSD columns. This can be useful if you wish to stick to SYSV format but want full command line details instead of resorting to the BSD ps auwwwwx format.
From: Robert Nichols on 11 Aug 2010 13:40
On 08/10/2010 10:02 PM, Rahul wrote: > I'm confused by my "ps aux" output. The owners of most processes are listed > by name (as is typical). > > e.g. > foouser 20644 0.0 0.0 90116 1924 ? S 21:49 0:00 sshd: > foouser(a)pts/7 > > But there's one user who's always listed by her uid (512 in this case): > > 512 17068 0.0 0.0 90116 1876 ? S 18:16 0:00 sshd: > baruser(a)pts/3 > > In the /etc/passwd file they look similar: > > foouser:x:502:100:foos Name:/home/foouser:/bin/bash > baruser:x:512:100:bars Name:/home/baruser:/bin/bash > > What else could be causing this difference? I'm stumped! Total shot in the dark here, but by any chance is there more than one user name that maps to UID 512? -- Bob Nichols AT comcast.net I am "RNichols42" |