When using no password you may be thrown a error
ex.
>>> sudoers file: syntax error, line xx <<<
sudo: parse error in /etc/sudoers near line xx
Solution :
if you are giving a single command then just add a comma
user ALL=command, NOPASSWD: ALL
instead of ( This will be throwing an error)
user ALL=command NOPASSWD: ALL
3 comments:
I had this same problem and after testing this solution out, I can say this is probably NOT going to do what you expect. This will allow all commands to be run without a password. What you probably want is:
user ALL=NOPASSWD:command
note that if you want to allow multiple, specific programs, use the syntax:
ALL=() NOPASSWD: ,,
note that if you want to allow multiple, specific programs, use the syntax:
ALL=() NOPASSWD: ,,
Post a Comment