Sponsored Content
Homework and Emergencies Emergency UNIX and Linux Support A way to capture the user list Post 302950614 by ggayathri on Monday 27th of July 2015 06:48:57 AM
Old 07-27-2015
I am trying to get this list from an AIX server.

---------- Post updated at 02:48 AM ---------- Previous update was at 02:48 AM ----------

Is there a way to generate a list with 2 columns - the first one being the user id, and the 2nd one being the group
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

user list

Hi, I have root access on Linux red hat server. How do I see the current user list and group they belong? ThankS! (3 Replies)
Discussion started by: whatisthis
3 Replies

2. Shell Programming and Scripting

Capture user imput commands

Hi all, I have a problem which needs to be solved soon because it affects auditing capabilities. There is an application id that has to be used by other users for the purpose of production support. The application user id uses C shell. We allow users to switch to the application user id based... (1 Reply)
Discussion started by: s_saran
1 Replies

3. UNIX for Advanced & Expert Users

Capture of all commands issued by the user “root”

I have to write a script (not C based) that allows to capture of all commands issued by the user “root”. First, I tried to monitor the .bash_history but the commands are written in chunk after the .bash_history is closed. How can I capture the commands in Real-Time without waiting root to... (4 Replies)
Discussion started by: elieifrah@gmail
4 Replies

4. Shell Programming and Scripting

How to process the user id list in /etc/group?

To all, I need to find a group in /etc/group and if found, I need to list out all the login ids for that group - one login id per line. To find the list of user login ids for group X, I probably will use cat /etc/group|grep ^X:|cut -d: -f4 This will return back a list of comma delimited... (4 Replies)
Discussion started by: april
4 Replies

5. Shell Programming and Scripting

IF $USER is not in this list of users, then do this

I need to add to a BASH script if ${USER} is not in a list of users (smitha, brownd, adamsp) then do something... what is the best shortest way to accomplish an if statement with a list like this? Also the list of users should be in the script, not an external file. Thanks! (5 Replies)
Discussion started by: glev2005
5 Replies

6. Shell Programming and Scripting

How to get list of user into an array..

Hi, cut -d: -f1,3 /etc/group >rpt.out I have a doubt in above unix commands. right i am getting list of group user id into rpt.out file. instead i need to store it as an array. could you please tell me how can i get list of user into an array.. If u could tell me give me in perl script... (2 Replies)
Discussion started by: solo123
2 Replies

7. Shell Programming and Scripting

Write a scripts to kill idle user for 60 min. & email user list to admin in text file

Folks, I have written one script for following condition by referring some of online post in this forum. Please correct it if I'm missing something in it. (OS: AIX 5.3) List the idle user. (I used whoidle command to list first 15 user and get username, idle time, pid and login time).... (4 Replies)
Discussion started by: sumit30
4 Replies

8. Shell Programming and Scripting

Capture the original user

in our environment role ids are created in unix to which user does su. say my individual id is drout and a role is devid. i will login to drout the su - devid password : <nothing > password less role id then i will login to devid. can i write a function and pass it in a script while i... (4 Replies)
Discussion started by: dr46014
4 Replies

9. Shell Programming and Scripting

List of process of user

Hi, I need an output of process running on server, i am executing ps -ef | grep test output is asak 22362 1 0 Nov07 ? 00:00:03 /usr/software/bin/perl-5.8.8 /u/assk/bin/test -v none JOBID=2012117 asak 23748 22362 0 Nov07 ? 00:00:00 /usr/software/bin/perl-5.8.8... (3 Replies)
Discussion started by: asak
3 Replies

10. HP-UX

How capture all user command line output?

Hi I want to know how capture all user command line output and save this commands and outputs to text files? if you have script for this subject please give me.:o please help me thank you (6 Replies)
Discussion started by: amvhd
6 Replies
logins(1M)						  System Administration Commands						logins(1M)

NAME
logins - list user and system login information SYNOPSIS
/usr/bin/logins [-admopstux] [-g group...] [-l login_name...] DESCRIPTION
This command displays information on user and system logins known to the system. Contents of the output is controlled by the command options and can include the following: user or system login, user id number, passwd account field value (user name or other information), primary group name, primary group id, multiple group names, multiple group ids, home directory, login shell, and four password aging param- eters. The default information is the following: login id, user id, primary group name, primary group id and the account field value. Out- put is sorted by user id, system logins, followed by user logins. OPTIONS
Options may be used together. If so, any login that matches any criteria are displayed. The following options are supported: -a Add two password expiration fields to the display. The fields show how many days a password can remain unused before it automatically becomes inactive, and the date that the password expires. -d Selects logins with duplicate uids. -g group Selects all users belonging to group, sorted by login. Multiple groups can be specified as a comma-separated list. When the -l and -g options are combined, a user is only listed once, even if the user belongs to more than one of the selected groups. -l login_name...Selects the requested login. Multiple logins can be specified as a comma-separated list. Depending on the nameservice lookup types set in /etc/nsswitch.conf, the information can come from the /etc/passwd and /etc/shadow files and other nameservices. When the -l and -g options are combined, a user is only listed once, even if the user belongs to more than one of the selected groups. -m Displays multiple group membership information. -o Formats output into one line of colon-separated fields. -p Selects logins with no passwords. -s Selects all system logins. -t Sorts output by login instead of by uid. -u Selects all user logins. -x Prints an extended set of information about each selected user. The extended information includes home directory, login shell and password aging information, each displayed on a separate line. The password information consists of password status (PS for password, NP for no password or LK for locked). If the login is passworded, status is followed by the date the password was last changed, the number of days required between changes, and the number of days allowed before a change is required. The password aging information shows the time interval that the user receives a password expiration warning message (when logging on) before the password expires. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ SEE ALSO
attributes(5) SunOS 5.10 5 Jul 1990 logins(1M)
All times are GMT -4. The time now is 08:49 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy