Il 03/01/2018 01:12, Tobias Giesen ha scritto:

I would like to get the user ID for a Linux user name.

You might execute from the application the "/usr/bin/id" command which should exist in any Linux flavour passing the required user name ( if it's the current user, UserName := GetEnvironmentVariableUTF8('USERNAME'); ) as a parameter and then parse the resulting output, sort of:

uid=500(colla) gid=500(colla) groups=500(colla),3(sys),5(tty),18(dialout)

Giuliano


_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to