MEMBERS(1) General Commands Manual MEMBERS(1)NAME
members - outputs members of a group
SYNOPSIS
members groupname
DESCRIPTION
This manual page documents briefly the members commands. This manual page was written for the Debian GNU/Linux distribution.
members is a program that sends a space-separated list of secondary member names to its standard output.
OPTIONS
The programs follow the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options is included
below.
-a, --all
Show all group members on one line. This is the default.
-p, --primary
Show only primary group members.
-s, --secondary
Show only secondary group members.
-t, --two-lines
Send two lines to standard output. First line is primary members, second line is secondary members. NOTE: This always displays two
lines, even if there are no members at all.
-h, --help
Show summary of options.
DIAGNOSTICS
Exit status is 0 (i.e. "success") if the group was found, and 1 (i.e., "failure") if the group was not found.
Technically, the exit status hinges on the output of getgrnam(3) as follows: if getgrnam(3) returns a null pointer, the exit status is 1,
and 0 otherwise.
BUGS
I don't know of any! If you find one, please let me know!
SEE ALSO groups(1)AUTHOR
This manual page was written by Jim Lynch <jim@laney.edu>, for the Debian GNU/Linux system (but may be used by others).
MEMBERS(1)
Check Out this Related Man Page
GPASSWD(1) General Commands Manual GPASSWD(1)NAME
gpasswd - administer the /etc/group file
SYNOPSIS
gpasswd group
gpasswd -a user group
gpasswd -d user group
gpasswd -R group
gpasswd -r group
gpasswd [-A user,...] [-M user,...] group
DESCRIPTION
gpasswd is used to administer the /etc/group file (and /etc/gshadow file if compiled with SHADOWGRP defined). Every group can have adminis-
trators, members and a password. System administrator can use -A option to define group administrator(s) and -M option to define members
and has all rights of group administrators and members.
Group administrator can add and delete users using -a and -d options respectively. Administrators can use -r option to remove group pass-
word. When no password is set only group members can use newgrp(1) to join the group. Option -R disables access to the group through new-
grp(1) command.
gpasswd called by a group administrator with group name only prompts for the group password. If password is set the members can still new-
grp(1) without a password, non-members must supply the password.
FILES
/etc/group - group information
/etc/gshadow - shadow group information
SEE ALSO newgrp(1), groupadd(8), groupdel(8), groupmod(8), grpck(8)AUTHOR
Rafal Maszkowski <rzm@pdi.net>
GPASSWD(1)
I want to do these commands in a script:
if the user name is 'toto' then the user switch to the group toto_group and then 2 others scripts are launched.
Unfortunately, after the command 'newgrp' the 2 scripts are not launched correctly.
But if I do the same, by hand, one line per one line, it... (11 Replies)
Discussion started by: Nathe
11 Replies
2. Post Here to Contact Site Administrators and Moderators
The members list has left me a bit confused. If I click on Members List and go to the page does it show the complete members list? Asking this because my name does not show up there. But if I click on B and go to page 3, I can see my username and stuff...
Why is this? (5 Replies)
Hi All,
How can I add few existing groups into a group?
eg. Currently, I have
- projgrp1 for proj1 with members proj1usr1, proj1usr2, proj1usr3..proj1usr10
- projgrp2 for proj2 with members proj2usr1, proj2usr2
- projgrp3 for proj3 wiht members proj3usr1, proj3usr3
Now, I would like to... (3 Replies)
I have a script that puts out a list that looks like this:
bb1 newyork
bb1 pittsburg
bb2 seattle
bb2 spokane
sl1 sacramento
I want to seperate the output so that it instead has a space between each group so like this:
bb1 newyork
bb1 pittsburg
bb2 seattle
bb2 spokane
sl1... (8 Replies)
Is there a command to get a list of group members? Something similar to the groups command, but instead of passing a username and returning groups, you pass it a groupname, and it returns members?
It is difficult to do it manually because the group membership information is split across two... (5 Replies)
Hello,
I am writing a script in which i need to collect all the secondary groups of all users ....
for primary goups i used " pgrp='groups <UID> | awk '{print $1}' "
primary group is one group so i did it easily...
how to get all the secondary groups string into one variable so that i... (3 Replies)
Whats a good way to group (by adding a new integer to the front of each line) pairs of lines, such that lines 1 & 2 are group 1, lines 3 & 4 are group 2, etc...
ex input:
A
B
C
D
etc...
ex output:
1A
1B
2C
2D
etc... (5 Replies)
I have an input file that contains the primary and secondary groups a user should have based on a pre-defined role. The input file looks like this:
<user_login>|<comment_field>|<role>
After I execute my script to do some grepping I have the following user file where the secondary groups are... (10 Replies)
hi guys, i have a long output and cant figure out a flexible way to show the meta members from a device. please help. some device have 2,4 or 8 meta members but for this example i have 4 meta members, what is a flexible way to pull them out from this output? need your inputs thanks.
... (4 Replies)
Dear Forum staff / Advisors / members ,
I am having something in my mind, about Linux / Unix possible Interview questions collections, I guess if I post them here,which might be useful for our members and for students, and in meantime we can discuss also about those questions, what's your... (4 Replies)
Hi,
I am facing chgrp issue for a directory on a NAS mounted partation.
issue details :
user1 belongs to two groups grp1(primary) and grp2(secondary) not able to change directory group to secondary.
WORKING on /tmp
#mkdir /tmp/a
#ls -ld /tmp/a
drwxr-xr-x 2 user1 grp1 117 Mar 24... (7 Replies)
Oracle Linux 6.6
grid user's secondary groups are asmadmin,asmdba,asmoper and dba
# id -a grid
uid=638(grid) gid=2000(oinstall) groups=2000(oinstall),2100(asmadmin),2200(dba),2300(asmdba),2301(asmoper)
I want to remove dba as the secondary group for grid and keep the remaining ones.
ie. I... (5 Replies)
Oracle Linux 6.5
oracle user's primary group is oinstall and its secondary group is dba,asmdba,asmoper.
For the below created directory, I want the users belonging to dba,asmdba,asmoper to be able create, read and execute files but not delete them. How can I achieve that.
If I use 775 as... (5 Replies)
Got a raise and a formal position of 'unix system engineer' in 2016.
I would like to thank you members and admins.
This would not be possible without you.
I will mention some..
Thank you Don, for making me learn and understand the importance of standards, which i try to apply as much as i... (3 Replies)