06-04-2009
/etc/passwd only contains the default group of the user , so you can grep the gid of group from file and match it with /etc/group to the default group of particular user
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
:p I have a very elementary question that is kind of buggin me because I cannot figure it out.
1. How do you make a new group, give it a name, and assign permissions to specific users to access this group?
2. How do you delete a file that begins with a '-'?
3. How do you login as a... (1 Reply)
Discussion started by: zorro
1 Replies
2. UNIX for Dummies Questions & Answers
whats the command to find a particular group,pls its urgent
thnks (3 Replies)
Discussion started by: bkan77
3 Replies
3. UNIX for Dummies Questions & Answers
hi eveyone i've recently requested my unix admin to create a userid for 2 groups. He created the id and i can see it by grep "id" /etc/group.
But when i login with that id into unix and try to cd that group it says permission denied. something like cd /groupname -- permission denied
Can my admin... (1 Reply)
Discussion started by: sammet
1 Replies
4. AIX
Hello
A couple of weeks ago, I added a user to an AIX 5.3 system.
I go to add one today, and it appears that when creating a user in smit, I cannot see any groups.
No primary groups
No Group set
No Admin Groups
The /etc/group and etc/secuity/group files seem to be intact.
I did... (4 Replies)
Discussion started by: mhenryj
4 Replies
5. Windows & DOS: Issues & Discussions
Hi all,
need info on using putty as group.
I am having huge numbers of servers. (say 100)
I am using putty to login remotely. i want to group each 25 hostnames or a set of servers into one putty instance. (see image attached.)
Currently i have to scroll down to see all the 100 servers.
... (2 Replies)
Discussion started by: karthikn7974
2 Replies
6. Solaris
how to create 1000 users in 1 group (0 Replies)
Discussion started by: tirupathi
0 Replies
7. Shell Programming and Scripting
What is Primary group and Secondary Group in Unix.? (1 Reply)
Discussion started by: gwgreen1
1 Replies
8. Shell Programming and Scripting
I have a requirement - replace specified positions in a string with a character. I found perl regex useful for this approach. however, I am facing the following issue.
The target file 'temp' contains -
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
The goal is to convert... (5 Replies)
Discussion started by: sam_roy
5 Replies
9. UNIX for Dummies Questions & Answers
Must I be in a group? I am using Ubuntu and am the only user on my PC. I know how to change groups but do not see a way to not be in a group. Any help would be appreciated. (2 Replies)
Discussion started by: nthepines
2 Replies
10. Shell Programming and Scripting
Hi,
I am looking at a slightly different sorting problem and I am not sure how to do it in bash.
I have the following input:
0 ... (8 Replies)
Discussion started by: jamie_123
8 Replies
LEARN ABOUT MOJAVE
getgrouplist
GETGROUPLIST(3) BSD Library Functions Manual GETGROUPLIST(3)
NAME
getgrouplist -- calculate partial group access list
LIBRARY
Standard system libraries.
SYNOPSIS
#include <unistd.h>
int
getgrouplist(const char *name, int basegid, int *groups, int *ngroups);
DESCRIPTION
The getgrouplist() function obtains information from opendirectoryd(8) to construct the group access list for the user specified in name.
The basegid is automatically included in the groups list. Typically this value is given as the default group number from the user's account
record.
The resulting group list is returned in the array pointed to by groups. The caller specifies the size of the groups array in the integer
pointed to by ngroups; the actual number of groups found is returned in ngroups.
RETURN VALUES
The getgrouplist() function returns 0 on success. If the size of the group list is too small to hold all the user's groups, getgrouplist()
returns -1 to indicate failure. In this case, the group array will be filled with as many groups as will fit.
FILES
/etc/group group membership list
SEE ALSO
setgroups(2), initgroups(3), opendirectoryd(8).
HISTORY
The getgrouplist() function first appeared in 4.4BSD.
BSD
June 9, 1993 BSD