
Who never execute a program being a non root user and read the famous Permission denied ?
To resolve this, There are many methods : to be in the right group, to add sudo rights to the user.
Belong to the right group :
Rights usnder Linux are divided into 3 entities :
- the user
- the group
- the other
So, in order to use this program, the user must belong to its group.
To authorize an user, just do (here for kvm) :
The sudo rights :
sudo is a program permiting an user to execute a program having temporaly the root rights. This is really usefull when we must change system security.An simple example is the httpd server by the Apache Foundation. This server open the 80 port to listen but for security reasons, only the root user can open ports under 1024 and it's awkward for some people as developers.
The solution consists of modifying system settings to authorize these modifications by other users than root.
The file to modify is /etc/sudoers but only root can do it using visudo or sudoedit /etc/sudoers.
Example giving to users belonging to the dev group to launch apache2 :
Some explanation :
- Cmnd_Alias is the program list (if many, separated by comma) associated to an alias (here apachectl)
- %dev ALL=(ALL) NOPASSWD: APACHE means that all users in the dev group can use commands defined by the APACHE alias. For a specific user, delete the %.
Articles similaires
| Comments |
|














