[fpc-pascal] Get user ID for name on Linux

Marco van de Voort marcov at stack.nl
Thu Jan 4 16:17:04 CET 2018

In our previous episode, Graeme Geldenhuys said:
> As Marco said, you can use the "users" unit. Here is an example of how I 
> use in in fpGUI, and it supports 32-bit and 64-bit systems.
> https://github.com/graemeg/fpGUI/blob/develop/src/corelib/x11/fpg_x11.pas#L4010-L4044
> Note though that it only works for Linux. So other UNIX-type systems 
> like FreeBSD and Solaris are not supported.

FreeBSD is mostly supported,  though two units (shadow and crypth) and some calls
relating to shadow passwords in users are not.

More information about the fpc-pascal mailing list