Enable / Disable root user in Ubuntu
# set password for root
sudo passwd root
# enable root
sudo passwd -u root
# disable root
sudo passwd -dl root
-u
unlocks the password of the named account (in this caseroot
)-d
deletes and-l
locks the password