-1

I want to enable user - "Ertop" to delete any file or directory under /var/log/http by update the visudo

I have redhat machine version 6.x

user name is Ertop

I set the following in visudo but not sure it this syntax is ok

Ertop ALL=(root) NOPASSWD: rm -rf /var/log/http/*

or

Ertop ALL=(root) NOPASSWD: sudoedit /var/log/http/*
King David
  • 549
  • 6
  • 20

1 Answers1

1

I set the following in visudo but not sure it this syntax is ok

the visudo command will check your syntax for you and stop you from saving the file if the syntax is incorrect

visudo: >>> /etc/sudoers: syntax error near line 112 <<<

According to the versions of visudo I have to hand visudo version 1.8.6p{3,7} visudo grammar version 42 on CentOS 6.8 and 7.3.1611 your syntax is incorrect.

user9517
  • 115,471
  • 20
  • 215
  • 297