On Sat, Jul 11, 2009 at 7:45 AM, Mulyadi Santosa <mulyadi.santosa@xxxxxxxxx> wrote:
Thanks. That woked out for me. Also, getgroups( ) worked in a similar manner for me.
Hi...
I think one of the way to do that is by calling getpwent() several
On Fri, Jul 10, 2009 at 11:35 PM, SandeepKsinha<sandeepksinha@xxxxxxxxx> wrote:
>
>
> On Thu, Jul 9, 2009 at 11:45 PM, Adrian Cornish <adrianc@xxxxxxx> wrote:
>>
>> Is there any inbuilt( ) c function which can validate if the passed
>> uid/gid exist's on the machine or not?
>> How about:-
>> struct passwd *getpwuid(uid_t uid);
>
> Thanks, but any for validating the gid ????
times until it returns NULL (meaning it hits the last record of
/etc/passwd). getpwent() returns passwd struct and gid is in there.
What do you think? man getpwent for further info...
Thanks. That woked out for me. Also, getgroups( ) worked in a similar manner for me.
--
Regards,
Sandeep.
“To learn is to change. Education is a process that changes the learner.”