This is a rather general answer, since your question also seems rather broad.
Strictly speaking, normal users are already quite limited in what they can do. Normal users can:
- Modify files in their own home directory.
- View system files that are not restricted
- Run most applications - that still by default only modify files in their home directory
The superuser command you most likely refer to is the sudo
command (by default). If a user is in the sudo
group, they can get elevated privileges, but this should only be given to system administrators.
It is possible to further limit what normal users can do, by doing the following (but this requires a lot of manual tweaking):
- You can limit read access to some system files - for instance you could change permissions for
/var/log/apt
from 0644 to 0640 to prevent normal users from viewing apt
logs.
- You can limit execution access for specific binaries - for instance you could change permissions for
/usr/bin/cat
from 0755 to 0750 to prevent normal users from executing the cat
command.
However, the above examples require manual tweaking for every single file/directory and every single binary you want to exclude from normal users.
Because of this, you should probably elaborate on which restrictions you actually want to impose, to see if it makes sense.