Questions tagged [sudoedit]
54 questions
12
votes
3 answers
This file must be edited with the 'visudo' command.?
Why it is recommended to edit /etc/sudoers file with the visudo command?
Here is a sample of the file:
## Sudoers allows particular users to run various commands as
## the root user, without needing the root password.
##
## Examples are provided at…

Ankit
- 1,385
12
votes
2 answers
Why is sudoedit writing to a temporary directory?
I used sudoedit to create a file:
$ sudoedit /etc/systemd/system/apache2.service
but when I went to save the file, it wrote it in a temporary directory (/var/temp/blahblah). What is going on? Why is it not saving it to the system directory?

Tyler Durden
- 5,631
3
votes
1 answer
sudoers - How to use NOPASSWD and sudoedit at the same time?
What is the syntax for using NOPASSWD and sudoedit at the same time in /etc/sudoers? I tried this:
john ALL=(ALL) NOPASSWD: sudoedit /path/to/file
but I still get prompted for a password.

Pavel Tankov
- 447
3
votes
1 answer
sudoers rule to start and stop eth interface
I got syntax error when i add this rules to sudoers :
ifdown eth0:1
ifup eth0:1
I also try with :
ifdown eth0\:1
ifup eth0\:1
And:
ifdown "eth0:1"
ifup "eth0:1"
How to allow a non root user to start and stop the eth0:1 interface ?

Med
- 125
2
votes
2 answers
sudoedit but no cp
I have access to a file /etc/apache/myfile.conf that gets included in httpd.conf.
The permissions are:
-rw------- 1 root root
I have sudoedit permission to the file but not read!
I can open the file, edit it, but I just want to copy the entire…

Kalpesh Soni
- 141
- 4