Before deciding what the user and group called
games should be used for, you should figure out why you would want to have distinct users. What special permissions are associated to games?
- Running games. There is usually no need for any privilege to run a game, beyond having a shell account. If you restrict users from running the games you've installed, they can install them on their own anyway.
- Accessing gaming hardware. Hardware devices are rarely game-specific: you can plug in a MIDI keyboard on a game port, use a joystick to control a physical object, …
- Participating in multi-user interactions — primarily storing high scores. This requires the game to run with elevated privileges if you don't want users to be able to edit the high score files with any editor or utility.
- Installing and maintaining game programs.
It's rare to have access control related to running games and accessing gaming hardware (there may be access control to gaming peripherals, but it's not specific to their use for gaming). It's common to have access control related to high score files and game program installation.
It's a bad idea to make a game program setuid. Most games are not designed with security in mind, and there is often a way for the user who runs the game to modify arbitrary files or even run commands with the game's elevated permissions. If the game executable is setuid, this allows the user running the game to modify the game executable and turn it into a trojan which can then infect any other user who runs the game.
Thus the user owning the game executables must not be used to control who can run them, use peripherals or write high score files. It can be used to control who can install games. If you have a
games user at all, its use would be to allow game administrators to sudo to the
game-administrators user (a more explicit name) and maintain a
/usr/local/games directory owned by
game-administrators. Such game administrator can gain privileges of any user who plays these games, so game administrator privileges should be given out only to trustworthy people.
To control access to high score files, it is ok to make them owned by a group, which can be (and often is) called
games. The games with shared high score files are then made setgid
games. Do not use the
games group for anything other than ownership of high scores and similar interaction files, and of game executables. Note in particular that the game executables must not be writable by the
games group: they must have permissions
rwxr-sr-x (2755). A user who manages to exploit a vulnerability in a setgid game will be able to modify high score files but cause no other mischief.
If you wish to restrict access to games to certain users, create a
game-players group and make the directory containing the games accessible only to that group, i.e. make
/usr/local/games (or wherever the games are) owned by
game-administrators:game-players and mode