Sponsored Content
Operating Systems Solaris How do you list users in a solaris group Post 302089830 by saainaath on Thursday 21st of September 2006 02:25:36 AM
Old 09-21-2006
Hey gill , you can go for one more command 'logins' which will show you all the users logged into ur system put a grep for the particular group

#logins | grep `cat /etc/group | grep <groupname> | cut -d ':' -f4 `

check out the syntax once am not sure but you will get all the users of a group logged in your system. Bye..
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

command help, how do i list the users of a group?

What command allows you to display a list of the userids of all the other users in a group, regardless if they are logged in or not? (3 Replies)
Discussion started by: crabtruck
3 Replies

2. 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

3. 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

4. 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

5. Solaris

How to list group members in solaris 9

Hi, I already gone through with old post regarding listing the group members and tried the command getenv group other the result is other::1:root i listed my part of the /etc/passwd file below test1:x:100:1::/home/test1:/bin/sh test2:x:101:1::/home/test2:/bin/ksh... (7 Replies)
Discussion started by: vr_mari
7 Replies

6. Shell Programming and Scripting

List ALL users in a Unix Group (Primary and Secondary)

Is there a command or better combination of cmds that will give me the list of Unix users in a particular Unix group whether their primary group is that group in question (information stored in /etc/passwd) or they are in a secondary group (information stored in /etc/group). So far all I got... (5 Replies)
Discussion started by: ckmehta
5 Replies

7. 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

8. 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

9. Shell Programming and Scripting

Script to list primary group of users

Dear All I am facing a problem with my script. I have to found the primary group of users . So first I selected all the groups and users register from a specific user : ONE Then I am making a file with all groups attached to the user : ONE Then I am making a file with all... (8 Replies)
Discussion started by: Aswex
8 Replies
logins(1M)																logins(1M)

NAME
logins - display system and user login data SYNOPSIS
groups] logins] DESCRIPTION
displays data concerning system and user logins. The format and content of the output is controlled by command options and may include: system or user login, user ID number, comment field value (for example, user name, location), primary group name, primary group ID, supple- mentary group names, supplementary group IDs, home directory, login shell, user security level, user audit events, and password aging parameters. The default data is: login, user ID, primary group name, primary group ID, and comment field value. Output is sorted by user ID, with user logins following system logins. The default output consists of login, user ID, primary group, primary group ID and comment field formatted into columns. The following options are available to this command: Display two account expiration fields. The fields show how long the account can be unused (in days) before it becomes inactive and the date the account will expire. Display logins with duplicate UIDs. Show multiple group membership data. Display with alternate format of one line of colon separated fields. Display logins with no passwords Display all system logins Sort output by login rather than UID. Display all user logins. Display extended information about selected users. This extended information includes home directory, login shell and password aging data, each on its own line. Password information consists of pass- word status (PS for valid password, LK for locked and NP for no password) and, if a password is present, date of last change, required number of days between changes, and number of days allowed between changes. In the case of non-trusted systems, the date of last change will be the latest Thursday since the change. Display all users belonging to groups, sorted by login. A comma separated list specifies multiple groups. Display the requested logins. A comma separated list specifies multiple logins. Specify a switch used to classify NIS or local users. With the option, only users belonging to the specified repository are displayed. Multiple options may be used. Any login matching any of the criteria will be displayed. A login will be displayed only once, even if it meets multiple criteria. EXAMPLES
List all logins in default format. List all logins that have no password or have a duplicate UID in default format. List all system logins in the alternate format. List all local users of the system. List all the NIS users of the system. WARNINGS
HP-UX 11i Version 3 is the last release to support trusted systems functionality. FILES
HP-UX password file. HP-UX group file. SEE ALSO
listusers(1), passwd(1), group(4), passwd(4), prpwd(4), shadow(4). STANDARDS CONFORMANCE
logins(1M)
All times are GMT -4. The time now is 10:09 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy