Forum > Linux

how to get the username

<< < (2/2)

a.atalla:

GetEnvironmentVariable('USER');         
this one was what i'm looking for but now i need another thing

my application will run on the user machine with root privilege ,and it will do some admin stuff on other users account ,so i need to know what the other users that use the computer

i wish that is clear

does the post u linked belongs to my question?

theo:

--- Quote from: a.atalla on July 07, 2010, 05:01:20 pm ---does the post u linked belongs to my question?

--- End quote ---

Yes.

Laksen:
It's easy.

Take a look at the users unit in the users fpc package. It contains everything you need. GetUserList, and GetUserData combined with FpGetuid from baseunix sounds like what you want :)

That's ofcourse a very unix specific unit :)

Navigation

[0] Message Index

[*] Previous page

Go to full version