Skip to main content
edited body
Source Link
cristi
  • 591
  • 3
  • 13

Try to add something like this:

user ALL = (root) NOPASSWD: /bin/cmd1 args, /bin/cmd2 args) NOPASSWD: root

On the above line:

  • user is the user that needs access to the commands
  • /bin/cmd1 args, /bin/cmd2 args are the commands
  • root is the user under which the commands will be executed

Try to add something like this:

user ALL = (/bin/cmd1 args, /bin/cmd2 args) NOPASSWD: root

On the above line:

  • user is the user that needs access to the commands
  • /bin/cmd1 args, /bin/cmd2 args are the commands
  • root is the user under which the commands will be executed

Try to add something like this:

user ALL = (root) NOPASSWD: /bin/cmd1 args, /bin/cmd2 args

On the above line:

  • user is the user that needs access to the commands
  • /bin/cmd1 args, /bin/cmd2 args are the commands
  • root is the user under which the commands will be executed
Source Link
cristi
  • 591
  • 3
  • 13

Try to add something like this:

user ALL = (/bin/cmd1 args, /bin/cmd2 args) NOPASSWD: root

On the above line:

  • user is the user that needs access to the commands
  • /bin/cmd1 args, /bin/cmd2 args are the commands
  • root is the user under which the commands will be executed