AlpineLinux 3.6: sudo without password

This article will describe how to omit sudo password.

1 Install sudo

Install sudo package and enable wheel group entry.

# apk add sudo
# sed -e 's/# %wheel ALL=(ALL) NOPASSWD: ALL/%wheel ALL=(ALL) NOPASSWD: ALL/g' \
      -i /etc/sudoers

2 Add user to wheel group

Add user to wheel group.

# adduser hiroom2
Changing password for hiroom2
New password:
Retype password:
passwd: password for hiroom2 changed by root
# sed -e 's/^wheel:\(.*\)/wheel:\1,hiroom2/g' -i /etc/group