I need to set the password for root user when sudo su -, ubuntu user should login via ssh key only.
#ssh -i server.pem ubuntu@example.com
ubuntu@example.com:~$ sudo su - --> should prompt the password of root
root@example.com:~# --> and also I have setup the password for root, but it does not prompt the password.
root@example.com:/etc/sudoers.d# cat 90-cloud-init-users
# Created by cloud-init v. 0.7.5 on Mon, 12 Sep 2016 10:23:06 +0000
# User rules for ubuntu
ubuntu ALL=(ALL) NOPASSWD:ALL
# User rules for ubuntu
ubuntu ALL=(ALL) NOPASSWD:ALL
# User rules for ubuntu
ubuntu ALL=(ALL) NOPASSWD:ALL