Table of Contents
- 1. Install sudo
- 2. Disable root login
1 Install sudo
Install sudo and add user to wheel group. Run visudo and edit /etc/sudoers and delete comment at the %wheel.
# apk add sudo # adduser lehungio wheel # sed -e 's;^# \(%wheel.*NOPASSWD.*\);\1;g' -i /etc/sudoers
2 Disable root login
Lock out root account with passwd -l and delete root password with passwd -d. You can change to root with sudo su – after this.
$ sudo passwd -l root $ sudo passwd -d root