What are /tmp/currentuser and /tmp/currentuid for ?


Linux-SWAT

Forum Addict!
Joined
Feb 13, 2010
Messages
9,184
Hi !


Are they used by some .pnd ?
 
Last edited by a moderator:
They are used by some scripts that need to be run as root to tell them who the currently logged on user is.
 
Ok, thanks.


And who create them ? It's Slim or Xfce ?


---EDIT :


I see they are used by the automounter.


It's a bit dirty no ?
 
Last edited by a moderator:
As far as I can see sudo/gksudo etc set a SUDO_USER and SUDO_UID/GID variable and su does not change USERNAME, that could be used as well I suppose.
 
@Linux-Swat: AFAIR they are set from within the xinitrc-process, i.e. after logging in with slim while starting X.


@Letalis: I can't come up with an example right now, but I remember that i have been in a situation where I was writing a script and where the SUDO_USER/SUDO_UID/GID are not available or helpful. Thankfully ED pointed me to /tmp/currentuser back then.
 
Back
Top