![]() In the terminal (Ctrl + Alt + T) you would have to write:Īs you can see in the screenshot above, the path for the apt command is / usr / bin / apt, therefore this is the path to add in the sudoers file. In case of not being sure of it, we can use the command ' where's'to find out the correct path to apt. ![]() In this case we want to add a command with a different path than the one we have used so far, the path to apt for example, we will need to correctly write the path to the executable file. Find the path to the command and add it to the sudoers file Yes indeed, when running all other commands, if you will be prompted to enter the password to use sudo. From now on, the user referred to by the line added to the file sweats you will not need to enter the sudo password while executing any of the added commands. We will be able add as many commands as we want separating them with commas, as it's shown in the following:Įntreunosyceros ALL=NOPASSWD:/bin/mkdir,/bin/chmodĪfter finishing adding the line, log out and log in again or reboot the system. According to this line, this user will be able to execute the command ' mkdir'without typing the sudo password. In this line that is added in the previous capture, entreunosyceros is the username. When the file is opened, at the end of it we will add the following line: In the terminal (Ctrl + Alt + T) we write: sudo visudo To do this, we will have to edit the sudoers. Let's say we want a user named interunosyceros run the mkdir command without having to type the sudo password. If for any reason, whatever it may be, you are interested in allowing a user to execute a particular command without having to type the sudo password, you should add that command to the sudoers file. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |