1. Find all the groups available on your system:
cat /etc/group |cut -d: -f1
2. For finding the groups that the current user belongs to:
groups
luser test adm cdrom sudo dip plugdev lpadmin sambashare
3. For finding groups user luser belongs to:
groups luser
luser : test luser adm cdrom sudo dip plugdev lpadmin sambashare
4. Now to see the files owned by group "test" in particular path or folder. Try
find /home -group test
find /etc -group root
5. To see all the users in the system:
compgen -u
6. To see all the groups in the system:
compgen -g
No comments:
Post a Comment