0

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 :)

Volker Siegel
  • 13,065
  • 5
  • 49
  • 65

2 Answers2

0

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.

ExplodingKittens
  • 882
  • 1
  • 9
  • 21
0

(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:

passwd -d myuser

Important warning:

While the above does what we asked it for, that change would cause problems soon. We also need to run:

pam-config -a --unix2-nullok

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 login

usermod -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!

Volker Siegel
  • 13,065
  • 5
  • 49
  • 65
  • Ehm well, It did work, the password changed. But either it can´t recognize a empty password, or I have done something wrong because now the password is not my old one, but it is neither empty. And since I have to use my computer very sone for exams, I´ll just do a reinstall, it needed it anyway :) – Rasmus Mathiesen Apr 10 '14 at 16:41
  • Uhoh... :) Where did you use the password exactly? Like login, ssh, su, sudo? (Sometimes, like with sudo, it may be the user- instead of the root password, counterintuitively) Ok, to be save I'll add a warning to the answer until I understand what happened. – Volker Siegel Apr 10 '14 at 16:57
  • I was in normal desktop mode and using the terminal I went to root via "sudo -i", then i changed the password via "passwd -d username" and just pressed enter as in blank. Afterwards it asked for sudo password, it wouldn´t take enter for an anwser, nor my old password. So I dont really know where the error orcurred. – Rasmus Mathiesen Apr 10 '14 at 17:06
  • Could really be some confusion with user password versus root password. Ok, with passwd -d username you changed the password of your user, not root; That's what you use with sudo... "should work" does not help :) – Volker Siegel Apr 10 '14 at 17:14