Re: Get UID/GID from a username string [wd-vc]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx]
> Gesendet: Freitag, 15. April 2016 09:14
> An: users@xxxxxxxxxxxxxxxx
> Betreff:  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@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx





[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux