[xubuntu-users] Detecting login name after su

Peter Flynn peter at silmaril.ie
Sat Oct 5 20:40:39 UTC 2013


On 10/05/2013 05:31 PM, ABIX Adam Jurkiewicz wrote:
> Dnia 2013-10-04, piÄ… o godzinie 12:10 -0700, Kevin O'Gorman pisze:
>> the OP also mentioned another way in, where it does not work:
>>
>> kevin at treat:~$ sudo su -
> 
> Because sudo -i differs from sudo su - 
> 
> I don't know the good way to detect original user regardless the way you
> do sudo.

w -u | grep 'w -u$' | awk '{print $1}'
seems to work.

///Peter






More information about the xubuntu-users mailing list