Sponsored Content
Full Discussion: Check users in a Linux group
Top Forums UNIX for Dummies Questions & Answers Check users in a Linux group Post 302919772 by Don Cragun on Friday 3rd of October 2014 02:08:02 PM
Old 10-03-2014
Quote:
Originally Posted by colshine
It highlights the grep keyword in the output. You can remove the -i color if it is not working for you.
No, it does not! On systems that have a color option, you would get what you described using:
Code:
grep --color cop /etc/group

The command you suggested:
Code:
grep -i color cop /etc/group

performs a case insensitive search for the string color in the files cop and /etc/group.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Adding users to /etc/group

I'm using SAM to add users on an HP and they're adding fine. But in /etc/group it only lists the group names. It's not adding the users in there. Is there a way to have them put in there without going into SAM and modifying the group and adding them? I guess what I want to happen is when I add... (1 Reply)
Discussion started by: golfhakker
1 Replies

2. AIX

Max users in a group ?

Hi All, Does anyone know if there is a maximum limit to the number of users that can be assigned to a group. I currently have on a production server 900+ users in 1 group. I know some of these users are no longer valid as we only have 500 employees and not all employees use this application. ... (4 Replies)
Discussion started by: anmiller
4 Replies

3. Shell Programming and Scripting

Sending an email to group of users

Hi , I want to write a Unix script which can send an automatic email to the group when my job is completed.I'm trying the following Mail -s "test" <groupname> << EOD >Completed >EOD With this i'm not able to send an email to group..Any ideas? Thanks in Advance (1 Reply)
Discussion started by: BhawanaAggarwal
1 Replies

4. Shell Programming and Scripting

SSH for a group of users ?

Hi, Can any one tell me is it possible to setup private key public key pairing(SSH ) for a group of users , instead of setting it up for individual users ? Eg: Say i have 3 users A,B and C and i want the users to connect to SERVER1. instead of generating public private keys for each user , is... (3 Replies)
Discussion started by: deepusunil
3 Replies

5. Solaris

How can i allow only a group of users in NIS?

Hello experts. I am using Solaris10. How can i allow a group of users, remaining should be deny. Thanx in advance. (9 Replies)
Discussion started by: younus_syed
9 Replies

6. Shell Programming and Scripting

Diffferentiate group from users

Im trying to put all the groups in into a variable called $GROUP, however in /etc/group there are also lotsa users. And the GID of group can differ as it can be set, this there is no specific range, how can i put all the names of the groups into that variable? (3 Replies)
Discussion started by: dplate07
3 Replies

7. Shell Programming and Scripting

Change of group to different users

Need to change the chgrp for different uses d---rwx--t 3 root 764 4096 Mar 16 2007 algavi d---rwx--t 6 root 2857 4096 Jul 16 11:28 alharki d---rwx--t 5 root 2739 4096 Oct 14 2008 alpen d---rwx--t 5 root 546 4096 Mar 16 2007 alvarez d---rwx--t 3 root... (2 Replies)
Discussion started by: gsiva
2 Replies

8. Programming

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:... (2 Replies)
Discussion started by: cybermeis
2 Replies

9. Shell Programming and Scripting

users per group

hi guys I am trying to display a list of groups and the respective users: Group1 : user1 user2 user3 .... the closest thing I get is echo " "; echo "Group Users "; echo " "; cat /etc/group |grep | grep -v nfswhich I really don't since I want to remove the other stuff like x : and... (4 Replies)
Discussion started by: karlochacon
4 Replies

10. HP-UX

Creating a group of users with script

Hi, I have a file with usernames, and the comment section, e.g : Data removed by request of sanchitadutta91, 20 May 2020 I need to add these users into a server. Is it possible to use a script to create the users, together with the comment ? From the commandline to add one user, the... (2 Replies)
Discussion started by: anaigini45
2 Replies
lgroupmod(1)						      General Commands Manual						      lgroupmod(1)

NAME
lgroupmod - Modify an user group SYNOPSIS
lgroupmod [OPTION]... group DESCRIPTION
Modifies the user group with name group. OPTIONS
-A, --admin-add=list Add users in comma-separated list among group's administrators. -a, --admin-remove=list Remove users in comma-separated list from group's administrators. Removing users that are not currently among group's administra- tors silently succeeds. -g, --gid=gid Change group's group ID to gid. -i, --interactive Ask all questions when connecting to the user database, even if default answers are set up in libuser configuration. -L, --lock Lock group. This prevents users from using the group password with newgrp(1) to become a member of group. -M, --member-add=list Add users in comma-separated list among group's members. -m, --member-remove=list Remove users in comma-separated list from group's members. Removing users that are not currently among group's members silently succeeds. -n, --name=name Rename group to name. -P, --plainpassword=password Set group's password to password. Note that the password can be viewed while running lgroupmod using tools such as ps(1). -p, --password=encrypted Set group's password to the password represented by the hash encrypted. Note that the hash can be viewed while running lgroupmod using tools such as ps(1). -U, --unlock Unlock group. EXIT STATUS
The exit status is 0 on success, nonzero on error. libuser Jan 11 2005 lgroupmod(1)
All times are GMT -4. The time now is 07:41 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy