How To List Users and Groups on Linux – devconnected
cat /etc/passwd
cat /etc/group
Using the groups command
The most memorable command to list all groups a user is a member of is the groups command. When executed without an argument the command will print a list of all groups the currently logged in user belongs to:
groupsThe first group is the primary group.
john adm cdrom sudo dip plugdev lpadmin sambashareTo get a list of all groups a specific user belongs to, provide the username to the
groupscommand as an argument:groups linuxize


Không có nhận xét nào:
Đăng nhận xét