The following will allow newuser to run any commands anywhere? How can I prevent it by allowing the user to run certain commands only?
visudo
## Allow root to run any commands anywhere
root ALL=(ALL) ALL
newuser ALL=(ALL) ALL
The following will allow newuser to run any commands anywhere? How can I prevent it by allowing the user to run certain commands only?
visudo
## Allow root to run any commands anywhere
root ALL=(ALL) ALL
newuser ALL=(ALL) ALL
You can create a command alias for newuser e.g.
then use that as part of the user specification
Read User Specification section in the
man sudoers
page for more details.