The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
.
google unix.com



High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Change of group to different users gsiva Shell Programming and Scripting 2 08-23-2009 07:09 PM
How can i allow only a group of users in NIS? younus_syed SUN Solaris 9 09-10-2008 06:41 PM
SSH for a group of users ? deepusunil Shell Programming and Scripting 3 07-22-2008 11:57 AM
Max users in a group ? anmiller AIX 4 09-05-2007 06:32 PM
How to obtain list of users ? bobby36 UNIX for Dummies Questions & Answers 7 04-10-2007 12:34 AM

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 09-13-2009
cybermeis cybermeis is offline
Registered User
  
 

Join Date: Aug 2009
Posts: 3
to obtain users of each group in c

Hello
They have ordered to me that makes several small utilities in C/C++ for the servants, among them a small program in C/C++ to generate a file HTML with the groups of that servant and in addition that is the corresponding users of that group.
For example of a group:
Group: Sys Members: root, bin, Sys, adm….
and that all the groups.
And not like doing it, to know the groups it is only question to read the /etc/group file, but nonencounter the form to know the members each group. That analogous functions to getpwent exist, setpwent… for groups, but encounter any information does not exceed they. Which use to make or another small program that generates a HTML with the data of all the users, but they do not serve me for this work in particular, or at least not like.
Thanks.
  #2 (permalink)  
Old 09-13-2009
fpmurphy's Avatar
fpmurphy fpmurphy is online now Forum Staff  
Moderator
  
 

Join Date: Dec 2003
Location: Florida
Posts: 1,923
I think what you are looking for is the getgrent() function.
  #3 (permalink)  
Old 10-07-2009
cybermeis cybermeis is offline
Registered User
  
 

Join Date: Aug 2009
Posts: 3
thanks,
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 09:10 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0