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,

Thanks

this might help..

% finger  | awk ' { print "id -a "$1 } ' | grep -vi login | sh
1 Like
echo user1 user2 | xargs -n1 id
1 Like

you guys are genius!

put the userslist in a.txt

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