The groups command display the groups a user is in. In this example, find out the group membership for user vivek, enter:
groups userNameSample outputs:
groups vivek
vivek : vivek adm dialout cdrom plugdev lpadmin netdev admin sambashare libvirtdUser vivek is member all of the above groups. Find out all users belongs to the group called adm:
grep -w groupName /etc/groupSample outputs:
grep -w adm /etc/group
adm:x:4:vivek,top,jerry
No comments:
Post a Comment