When you run Ubuntu as a live boot you are able to install programs etc. without a password, but when you have installed it you have to choose a password and you have to put it in everytime you want to do something system critical. Can you make an install without any kind of password? I am very aware that it is a lot more safe to have the password, i´m just curious :)
Unfortunately, due to the nature of the Linux kernel, you require a root (or just user, in the case of sudo) password to install any programs or do anything possibly dangerous to the system.
This doesn't apply to Live CDs, because of the easily recoverable nature of Live CDs. You mess up a Live CD, you can just reburn it. You mess up an installation on a hard drive though, not so easy.
(Warning of potential problem with this answer while investigating: this technically did work, but possibly caused or triggered a bigger problem later on; See comment.)
It should be possible to set an empty password for your user, and for root too. You may need to be root to set the empty password, even for your own user.
To remove the current password of
myuser
by replacing it with an empty password, you can use:Important warning:
While the above does what we asked it for, that change would cause problems soon. We also need to run:
to make other security components to not reject the unusual empty password setting.
To make password-less login work in the GUI login screen, the user needs to be added to the group
nopasswdlogin
: Enable empty password loginusermod -a -G nopasswdlogin myuser
If interested in some extra details, here is someone making a similar change manually, by replacing text in configuration files.
Manual no-password setup
And if you want sudo to work see here Execute sudo without Password?
As always, have backups!