cp /etc/sudoers /tmp/sudoers.date
Then edit the /etc/sudoers file here we can edit in 2 ways
1:- vi sudoers
or
2:- visudo
visudo is the recomandded to edit the sudoers file
here you go
# visudo
add below enterie ( " suppose you need to give sudo access to ramesh" ) here what you need to add
ramesh ALL=(root) NOPASSWD: /usr/sbin/tcpdump
:wq!
Now user can run tcpdumps using below command
#sudo tcpdump**********************
No comments:
Post a Comment