ref.
sudo 時不需輸入密碼
- Backup your /etc/sudoers file by typing the following command:
sudo cp /etc/sudoers /root/sudoers.bak
- Edit the /etc/sudoers file by typing the visudo command:
sudo visudo
- Append the following entry to run ALL command without a password for a user named
cola
:
e.g.
cola ALL=(ALL) NOPASSWD:ALL
- Save and exit the file.