httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben RUBSON <ben.rub...@gmail.com>
Subject Re: [users@httpd] Get UID/GID from a username string [wd-vc]
Date Fri, 15 Apr 2016 07:31:06 GMT
Well I would like to be able to do it on the fly when a request is proceeded by Apache.
Through mod_rewrite for example.
I already do it with a RewriteMap which returns me UID/GID, but perhaps there is a less time
consuming solution.

Ben



> 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:
> 
> HTH
> Kurt Bremser
> AMOS Austria
> 
> Newton was wrong. There is no gravity. The Earth sucks.
> ________________________________________
> Von: Ben RUBSON [ben.rubson@gmail.com]
> Gesendet: Freitag, 15. April 2016 09:14
> An: users@httpd.apache.org
> Betreff: [users@httpd] Get UID/GID from a username string [wd-vc]
> 
> Hello,
> 
> 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,
> 
> Ben

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message