I want to know if there is any alternate C library for the unix command groups,
$ groups ---- lists all the group id's of the user.
There is a method called getgroups() but it returns the groups of the user this method. Is there a way to get groups for a particular user using C.
#include "<grp.h>"
int getgrouplist(const char *user, gid_t group, gid_t *groups, int *ngroups);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With