[xubuntu-users] Detecting login name after su
Peter Flynn
peter at silmaril.ie
Fri Oct 4 20:56:42 UTC 2013
On 10/04/2013 09:42 PM, Kevin O'Gorman wrote:
[...]
> w is a new one on me. Interesting, and it has the info, but I can't
> rely on getting it the way shown:
> kevin at treat:~$ sudo su -
> [sudo] password for kevin:
> root at treat:~# w -u | grep 'w -u$'
> root at treat:~# w -u
> 13:40:56 up 3 days, 6:48, 1 user, load average: 2.75, 2.40, 2.23
> USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
> kevin tty7 Tue06 3days 3:35m 0.01s
> /bin/sh /etc/xdg/xfce4/xinitrc -- /etc/X11/xinit/xs
> root at treat:~#
Hmm. On my systems the last command typed by the user is shown under the
WHAT column:
peter at pentacle:~/$ w -u
21:54:46 up 1:30, 2 users, load average: 0.52, 0.64, 0.51
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
peter pts/0 :0 20:26 6.00s 0.25s 0.00s w -u
peter pts/1 :0.0 21:52 2:30 0.22s 0.22s bash
peter at pentacle:~/$
Perhaps this is a version or security issue.
///Peter
More information about the xubuntu-users
mailing list