51

Here are my circumstances:

  • I am running Ubuntu 12.04.
  • I have one user account.

I absolutely hate the password requirement. How do I disable this requirement such that my Linux computer will behave more like Windows in this respect? I do not want to hear that I shouldn't this because it is not secure. This is my desire so the concern of security is effectively null and void.

3
  • 8
    Which password requirement? Your user's password or the administrative password? Also what do you mean with "more like Windows?" My windows machine has similar behavior to Ubuntu so if you could clarify that would be great! Jan 2, 2013 at 1:12
  • What do you mean? There's an option to login automatically. If you mean the password to do administrative tasks, there's probably ways around it but would not make sense to do it. You do not need to enter the password that often at all. Jan 2, 2013 at 1:14
  • the below answer doesn't work for me on Ubuntu16. But this one works: askubuntu.com/questions/147241/execute-sudo-without-password Oct 4, 2017 at 17:12

1 Answer 1

70

For the administrative password using sudo and sparing any lectures on why one would not want this...

Edit the sudoers file:

sudo visudo

Find this line:

%sudo ALL=(ALL) ALL

Change the line:

%sudo ALL=(ALL) NOPASSWD: ALL

Save and Exit. Voila! (Dont' shoot yourself in the foot, now. ;)

By the way, you can become root and just type the password once.

sudo su -

Now you ARE the root user, seeing no more password prompts. When you see guides referring to commands such as sudo some_command, just remove the "sudo" portion. In this way, you can choose to leave the security intact yet bypass it as you see fit.

If you are writing about your user account:

Open System Settings. Click on the User Accounts tile. Click the Unlock button and enter your password. Set the auto-login slider to the "on" position by dragging it to the right. Then click "Lock" to apply your changes.

8
  • Is there any way to do it without selecting auto-login? I've heard something about a blank password hash, though that would probably still require a password prompt. And can this be done without becoming the root user?
    – Melab
    Jan 2, 2013 at 3:18
  • @Melab One part is for admin access; one, for regular user acct. No, you cannot do the sudo part without having admin access.
    – user8290
    Jan 2, 2013 at 20:45
  • 1
    +1 for the sudo su - tip.
    – radj
    Feb 27, 2014 at 9:32
  • 1
    How do we do this without vi? I can't use vi for the life of me.
    – mpen
    Aug 7, 2014 at 16:43
  • 1
    Mark -- try installing 'nano'. It's a modeless text editor, which makes it a lot easier to use if you're unfamiliar. vi/vim has a steep learning curve. Sep 18, 2014 at 21:20

Not the answer you're looking for? Browse other questions tagged .