Skip to content

Latest commit

 

History

History
15 lines (11 loc) · 391 Bytes

sudoWithoutPassword.md

File metadata and controls

15 lines (11 loc) · 391 Bytes

Allow sudo commands for a specific user without a password promt.

Debian based OS.

  • in /etc/sudoers
# Allows user 'myuser' to reboot, update, upgrade, and remove.
myuser ALL=NOPASSWD:/sbin/reboot
myuser ALL=NOPASSWD:/usr/bin/apt-get update
myuser ALL=NOPASSWD:/usr/bin/apt-get -y upgrade
myuser ALL=NOPASSWD:/usr/bin/apt-get -y autoremove

User may not be in sudoers.