Groups

From ArchWiki

Jump to: navigation, search
i18n
English
Italiano

Adding a user to a permission group enables that user to perform certain actions or access certain files pertaining to that group. All available groups can be found using the command "cat /etc/group"

Contents

[edit] List of common groups

Below is a list of common groups and their function in Arch.

  • audio = sound
  • camera = access to cameras.
  • disk = block devices not affected by other groups such as optical,floppy,storage.
  • floppy = access to floppy drives.
  • kmem = rights to /dev/mem, /dev/port, /dev/kmem
  • locate = access to command updatedb
  • log = access to log files in /var/log.
  • lp = printers
  • network = right to use Networkmanager (if you want to use NM-Applet or KNetworkmanager you need to be in this group)
  • optical = access to dvd/cd drives.
  • power = right to suspend etc
  • root = root/admin power (security warning: don't add your user to this unless you know what you're doing!)
  • scanner = scanners
  • storage = access to external drives (hard drives, flash/jump drives, mp3 players, etc)
  • thinkpad = for thinkpad users accessing /dev/misc/nvram through e.g. tpb
  • tty = access to serial/USB devices like modems or handhelds
  • users = default users group (recommended)
  • vboxusers = right to use virtualbox
  • video = DRI/3D acceleration
  • vmware = right to execute vmware
  • wheel = right to use sudo (setup with visudo) (PAM also affects this)

[edit] Common actions

[edit] List all groups

To list all groups currently available on your system.

cat /etc/group

[edit] List your current groups

To find out what groups your user is currently a member of, simply issue the command "groups". You can also use "id" for more verbose output.

[edit] Finding group ownership

You can list files owned by a group with this command if needed.. as root (where [group] is the group name you wish to search for)

find /* -group [group]

[edit] Adding user to a group

You can add a user to a group by using this command as root (where [group] is the group you want to add and [user] is the user you want to add to the group)

usermod -aG [group] [user]

or

gpasswd -a [user] [group]

[edit] Creating a new group

You can create a new group by using the following command as root (where [group] is the name of the group you wish to create)

groupadd [group]
Personal tools