1

I want to run Ubuntu without ever having to enter a password - not on install and not during any kind of operation. Is this possible? I have read through the forums and really did not see an answer. All the responses were "there is no reason to do it" and "here is a temporary work around", but there was never and answer.

I am running a copy of Ubuntu on a virtual machine (vmware) which is running on a physical computer that has no internet access, no physical access by anyone but me and one user - me. No data is stored on that machine. There is no possibility of an kind of security issue unless my dog suddenly becomes a hacker. If by not having a password I accidentally corrupt some system file, I just delete that virtual machine and create a new one. I hope this obviates the need to have a opinion based discussion on the merits of a password.

Just for the curious, I am developing code for hardware and the ubuntu machine runs my JTAG debugger - that is all it does and all it will ever do. The reason to remove the password has to do with some issues with the debugger software - which I spent way to long on the phone with the provider trying to fix and now just need to get back to the real job at hand.

So is it possible? If so, what do I need to do?

  • No, not possible. – user589808 Jan 22 '17 at 2:46
0

Short answer: Yes, you can; but you shouldn't.

Long answer: You can remove most of the sudo and pkexec password prompts, but you should try a less intrusive/brute-force approach.

I think you can achieve what you are looking for without the need of a fully password-free system (but you can use this instructions to apply them to your user), anyway you'll have to be very carefull about what your app does, because you can break and mess your system, and maybe your hacker Dog too :) .

You can create a group and add a rule to sudoers file which grants users from this group to run sudo commands without password.

  • First create a new group let's say sudonopw with sudo addgroup sudonopw.

  • Next add the user who should run you app with sudo usermod -aG sudonopw targetUserName.

  • Then edit the sudoers file running visudo from terminal, and add the following just before the line #includedir /etc/sudoers.d (keep that line as is, is not a comment):

    # Allow members of group sudonopw to execute any command without password
    %sudonopw ALL=(ALL) NOPASSWD: ALL
    

Also if your app is launched from GUI and displays a graphical (polkit) password prompt, you can create a polkit file removing the need for a pasword promt (I'm not get tired to warn about security and stability implications) for the same or other group.

To do this, create the file 99-nopassword.pkla in /etc/polkit-1/localauthority/50-local.d/ with:

sudo nano /etc/polkit-1/localauthority/50-local.d/99-nopassword.pkla

And add the following content:

[No password prompt]
Identity=unix-group:sudonopw
Action=*
ResultActive=yes

Save and reboot.

Hope it helps.

Not the answer you're looking for? Browse other questions tagged or ask your own question.