httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bremser, Kurt (AMOS Austria GmbH)" <>
Subject AW: [users@httpd] Get UID/GID from a username string [wd-vc]
Date Fri, 15 Apr 2016 07:26:17 GMT
In case your system uses /etc/passwd, this will get you both values separated by a colon:

grep username /etc/passwd|cut -f3,4 -d:

Kurt Bremser
AMOS Austria

Newton was wrong. There is no gravity. The Earth sucks.
Von: Ben RUBSON []
Gesendet: Freitag, 15. April 2016 09:14
Betreff: [users@httpd] Get UID/GID from a username string [wd-vc]


I already do it with a RewriteMap Perl script, but perhaps a faster (in terms of performance)
solution exists.
Let's assume an incoming request contains a username, is there a way to get the system UID
of this username string (Linux/FreeBSD) ?
And from a UID string, to get the corresponding GID ?

Thank you very much,


To unsubscribe, e-mail:
For additional commands, e-mail:

AMOS Austria GmbH 
1130 Wien, Hietzinger Kai 101-105 
FN 365014k, Handelsgericht Wien 
UID: ATU 66614737 

Dieses E-Mail und allfaellig daran angeschlossene Anhaenge 
enthalten Informationen, die vertraulich und 
ausschliesslich fuer den (die) bezeichneten Adressaten 
bestimmt sind. 
Wenn Sie nicht der genannte Adressat sind, darf dieses 
E-Mail samt allfaelliger Anhaenge von Ihnen weder anderen 
Personen zugaenglich gemacht noch in anderer Weise 
verwertet werden.
Wenn Sie nicht der beabsichtigte Empfaenger sind, bitten
wir Sie, dieses E-Mail und saemtliche angeschlossene
Anhaenge zu loeschen. 

Please note: This email and any files transmitted with it is 
intended only for the named recipients and may contain 
confidential and/or privileged information. If you are not the 
intended recipient, please do not read, copy, use or disclose 
the contents of this communication to others and notify the 
sender immediately. Then please delete the email and any 
copies of it. Thank you.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message