visudo command actually opens /etc/sudoers to edit.
Uncomment line of %wheel ALL=(ALL) ALL will ask for password when sudo. Uncomment line of %wheel ALL=(ALL) NOPASSWD: ALL won’t ask for password when sudo.
## Allow root to run any commands anywhere root ALL=(ALL) ALL
## Allows members of the 'sys' group to run networking, software, ## service management apps and more. # %sys ALL = NETWORKING, SOFTWARE, SERVICES, STORAGE, DELEGATING, PROCESSES, LOCATE, DRIVERS
## Allows people in group wheel to run all commands # %wheel ALL=(ALL) ALL
## Same thing without a password %wheel ALL=(ALL) NOPASSWD: ALL
## Allows members of the users group to mount and unmount the ## cdrom as root # %users ALL=/sbin/mount /mnt/cdrom, /sbin/umount /mnt/cdrom
## Allows members of the users group to shutdown this system # %users localhost=/sbin/shutdown -h now
## Read drop-in files from /etc/sudoers.d (the # here does not mean a comment) #includedir /etc/sudoers.d