id -a multiple users at one time?

Thread Tools Search this Thread
Top Forums Shell Programming and Scripting id -a multiple users at one time?
# 1  
Old 06-28-2011
id -a multiple users at one time?

Hi Expert,

How do I want to id -a multiple users at one time?

* i know that this does not work,

e.g id -a {user1,user2}
# 2  
Old 06-28-2011
this might help..

% finger  | awk ' { print "id -a "$1 } ' | grep -vi login | sh

Last edited by Neo; 06-28-2011 at 02:53 AM.. Reason: fixed code tags
This User Gave Thanks to jayan_jay For This Post:
# 3  
Old 06-28-2011
echo user1 user2 | xargs -n1 id

This User Gave Thanks to KenJackson For This Post:
# 4  
Old 06-28-2011
you guys are genius!
# 5  
Old 06-28-2011
put the userslist in a.txt

while read user; do id -a $user; done < a.txt

Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

How to apply the update statement in multiple servers on multiple dbs at a time .?

Hi , Can any please help the below requirement on all multiple servers and multiple dbs. update configuration set value='yes' ;1) the above statement apply on 31 Databases at a time on different Ip address eg : (unix ip address ) the above ip box contains 4 db's eg : db... (2 Replies)
Discussion started by: venkat918
2 Replies

2. UNIX for Advanced & Expert Users

Multiple Users - Multiple Scripts

Hello All, I have to restart 100's of scripts for at least 20+ users once the server restarts for any reason. I wanted to come up with a single script to trigger of all scripts/programs under all users with just one script (without root privilege). Is it possible to do so? :confused: If not,... (6 Replies)
Discussion started by: PikK45
6 Replies

3. Shell Programming and Scripting

Create multiple users with individual passwords to users

hi, i am new to shell scripts i write a shell script to create multiple users but i need to give passwords to that users while creating users, command to write this script (1 Reply)
Discussion started by: DONFOX
1 Replies

4. Shell Programming and Scripting

Specified log in time for users

I have this task : Check the logintime.txt every minute to only allow user to log in at the specified time. logintime.txt has the following content: USER TIME_START TIME_STOP Example: john 17:00 18:00 My idea is locking the user at the TIME_STOP and unlocking at the TIME_START while... (4 Replies)
Discussion started by: muffle
4 Replies

5. Shell Programming and Scripting

Monitoring a users log in time?

how do i start with this guys? Sample run: $ LOGTIME it2015678 <enter> User it2015678 is CRUZ Tommy H And has logged on to the system for: 8 hours 12 minutes from the time this script was run. (1 Reply)
Discussion started by: skypigeon
1 Replies

6. UNIX for Dummies Questions & Answers

Date, time, users

i need to find out following ways to show out put in a shell script when the user selects that option in a case statement. I have the case statement already started just need to find out how to read the following: current date and time (should it be read date)? users logged in (should it be... (4 Replies)
Discussion started by: vthokiefan
4 Replies

7. UNIX for Advanced & Expert Users

same file being opened by two users at a time

I want to avoid a situation where because two users simultaneously open a file and modify and save, leaving the original file in mess. Is there a way in UNIX to warn a user if that particular file is already being used by another user. Thanks in advance (3 Replies)
Discussion started by: paresh n doshi
3 Replies

8. Programming

how can get users list and their login time?

i'm sorry if yesterday i posted this thread in unix for dummies forums, :D i am a newbie in C programming i want to get active users list and their login time... i have search and learn about passwd and utmp, but i only can get user list without their login time... do you have an idea... (2 Replies)
Discussion started by: alif
2 Replies
Login or Register to Ask a Question