01-09-2006
Finding the group to which a user belongs
Is there any command to find to which group u ser belongs
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi all,
How can I check if a particular user id belongs to a group?
(ie. how to check if the current user `whoami` is part of the a certain group? do i use the group name of group id?)
Thanks in advance (2 Replies)
Discussion started by: rockysfr
2 Replies
2. Shell Programming and Scripting
I need to find all the files that have group Read or Write permission or files that have user write permission.
This is what I have so far:
find . -exec ls -l {} \; | awk '/-...rw..w./ {print $1 " " $3 " " $4 " " $9}'
It shows me all files where group read = true, group write = true... (5 Replies)
Discussion started by: shunter63
5 Replies
3. AIX
While doing a "little" clean up job, i noticed something weird...
A ls -altr of my / showed this:
drwxr-xr-x 1549 johcham grands 102400 Jan 28 13:13 home
How can a user become the owner / modify the group of my /home??? any thoughts? Can i chown this back to bin:bin (i think that... (2 Replies)
Discussion started by: Stephan
2 Replies
4. AIX
Hi Friends,
I am trying to write a script for finding all the users with the GID 0 i.e. Admin users. can you please help me on this. (1 Reply)
Discussion started by: anoopraok
1 Replies
5. UNIX for Advanced & Expert Users
how to use ldapsearch to find all the netgroups a user belongs to? It's Solaris. (1 Reply)
Discussion started by: jalite19
1 Replies
6. Linux
I have setup a group quota for better disk usage.
What i am doing is to setup a quota with Samba share. I created user1,user2 and group project1 which belongs to /home/project1 dir. Quota is implemented on project1 group to write 100 MB on this share and This is working fine if a user1 and user2... (3 Replies)
Discussion started by: sunnysthakur
3 Replies
7. UNIX for Dummies Questions & Answers
Hi all,
How can i find the group owner name...???
Thanks (4 Replies)
Discussion started by: mansahr143
4 Replies
8. UNIX for Dummies Questions & Answers
How would I find out who the group openers is of a file? For example:
> ls -l myfile
-rwxr-xr-x 1 myronp hawks 20125 Oct 20 20:50 myfile
How do I return just hawks. I could do this with a series of cut or awk, but is there a more direct way.
The ls -g is better, but still... (1 Reply)
Discussion started by: Dad4x
1 Replies
9. Red Hat
Hi,
In the following output you can see the the user "richard" is a member on the team/group "developers":
# id richard
uid=10247(richard) gid=100361(developers) groups=100361(developers),10053(testers)
but in the following details of the said group (developers), the said user... (3 Replies)
Discussion started by: indiansoil
3 Replies
10. Shell Programming and Scripting
I need help with a tcl code. I have a variable "myIP" which reads IP address from socket. How do I use regex to find out if it belongs to a group for e.g., 50.65.75.240/28 or 50.65.75.128/25 etc. (2 Replies)
Discussion started by: ampak
2 Replies
LEARN ABOUT HPUX
netgroup
netgroup(4) Kernel Interfaces Manual netgroup(4)
NAME
netgroup - list of network groups
DESCRIPTION
File defines network-wide groups, and is used for permission checking when executing remote mounts, remote logins, and remote shells. For
remote mounts, the information in classifies machines; for remote logins and remote shells, it classifies users.
Each line of the file defines a group. The items on a line may be separated by a combination of one or more spaces or tabs. The line has
the format
groupname member1 member2 ...
where memberi is either another group name, or a triple.
If any of these three fields is left empty, it signifies a wildcard. Thus
defines a group to which everyone belongs. Field names that begin with something other than a letter, digit or underscore (such as do not
match any value. For example, consider the following entries.
Machine belongs to the group in the domain but no users belong to it. Similarly, the user belongs to the group in the domain but no
machines belong to it.
Note, the domainname field must match the current domain name (as returned by the command), or the entry is not matched. Also, the user-
name field is ignored for remote mounts. Only the hostname and domainname are used.
The Network Information Service (NIS) can serve network groups. When it does, the groups are stored in the following NIS maps:
Refer to ypserv(1M) and ypfiles(4) for an overview of Network Information Service.
AUTHOR
was developed by Sun Microsystems, Inc.
FILES
SEE ALSO
makedbm(1M), mountd(1M), ypmake(1M), ypserv(1M), getnetgrent(3C), hosts.equiv(4), ypfiles(4).
Chapter 7:
netgroup(4)