Re: how to get common name using gid and uid

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

 



On Thursday 18 March 2004 11:55, Chris W. Parker wrote:
> hello,
>
> given a gid or uid, how do i get the group name or user name
> respectively? i'm doing this within php, but i will be executing
> something via the cl and then storing the results. i know i can
> grep the /etc/passwd and /etc/group files but i'd like to find out
> if there's a better way.
>
> can someone help me out with this?
>
>
> thanks,
> chris.

Try "getent"; Can't say it's "better", but it is "different."

getent passwd
getent groups
getent hosts .... etc

man getent

Regards,  Mike Klinke


-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux