How to disable password prompts in Ubuntu

This tutorial will explain How to disable password prompts in Ubuntu

Note:- Disabling password prompts might be a security risk

Open the terminal window from Applications --> accessories --> terminal, run the command:

sudo visudo

Find the line that says

%admin ALL=(ALL) ALL

and change it to

%admin ALL=(ALL) NOPASSWD: ALL

Save and exit the file

Sponsored Link

You may also like...

68 Responses

  1. lasombra says:

    Is that really a good advice? I doubt. It’s a big security issue and people should know what consequences this might have.

  2. It seems to be getting rid of a big head ache….. but is this safe?

  3. mrjack says:

    I would not recommend such a mod.
    I’d prefer to insert passwords everytime.

    Sure, it’s up to each user. Just my 2 cents.

  4. Anxious Nut says:

    mrjack +1

    By this, users will have viruses like windows’; not asking for installation is the first step.

    I know I’d never do this!!

  5. Jos says:

    Well, i want do excerce this command, but I can’t edit sudoers.tmp

    the command gksudo visudo opens this file but i can’t change the lines.

    How must i act to change the line?

  6. Dan says:

    Sheesh, why not just install Windows if you want to compromise your system’s security?

  7. sipiatti says:

    yep, dumb idea.
    99% of windows security problems coming from the bad habit that users using their system as sysadmin (of course also have designing issues)
    why we would want to repeat it here??

  8. omg says:

    if you’re stupid enough to get compromised, you deserve it, IMO. this is for people who know how to secure a basic network/lock services down the way they should be etc..

    it’s just common sense. you shouldn’t be using Linux if you don’t know how to do those things

  9. If you’re using linux, there’s a good chance that you know what you’re doing.. If I start GParted and don’t get any password prompt it wouldn’t be a problem, because I know you can fuck up your hard drive by messing with partitions, but it’s not like it’s windows UAC… not that annoying

  10. Guys, if you can’t edit it in the way mentioned here…. don’t try to find alternative ways….. i had to format my system by trying to do so 😛 (curiosity kills the cat :P)

  11. ZAH3R says:

    the true command is

    sudo visudo

    thanks

  12. Mark says:

    No, no, no. Disabling password prompts is madness. The password prompt is not fool-proof but having to go to the effort of entering it is supposed to at least make you stop and think. The whole idea of ordinary users and super users is something that has been one of the merits of Linux over less secure environments like Windows.

    If a sys admin, developer or programmer really wants to disable password protection to do development work in Ubuntu, it is much easier to enable root and log in and work as root user for that purpose and keep password protection for their other users accounts. Most distros do this by default anyway and it’s what root is there for.

  13. Eli says:

    I’m all for keeping the prompts.

    To shave off some time, go through the Authorizations and grant yourself rights on certain things. This’ll cut down on the time one spends entering passwords, but not get rid of it completely.

  14. Gallupy says:

    MY computer do what I want not what anyone else says.

    Last system 9.04 never had this nag so what’s the reason you want to nag me now for.

    Not like I am logged in as root. Just my opinion.

  15. Had3z says:

    But if you’re just a single user, and don’t have a server or anything will this still be a bad idea.

  16. Ryan says:

    More importantly than “how” perhaps you could give us an argument for “why”?? This is a terrible decision from a security standpoint. Don’t do it.

  17. cm says:

    Its a little easier to edit the sudoers file with this command:

    sudo EDITOR=gedit visudo

    Not sure where I found this but I like it because it is much easier for me to use gedit than vim…

  18. cm says:

    And yeah… If you are just a single user and you don’t feel like anyone is after you, I don’t see why it’s so bad…

  19. Ryan says:

    People ARE after you. There are hundreds of thousands of infected computers in worldwide botnets as a result of Windows’ swiss-cheese security. Look it up.

  20. cmcanulty says:

    I tried this and was very careful . Now I can’t update can’t use gksudo nautilus can’t open symantic and can’t open the sudoers file to change it back!!! Help please, I was very careful and typed exactly as it said to, is there any way to undo this?

  21. admin says:

    Just use the same procedure to remove the changes (instad of adding remove the command)

  22. Janne says:

    Yeah you need a LiveCD (any Linux dist will do), boot up mount your / partition and edit the sudoers file. I’m sure you missed something that’s why you got locked out.

    Btw, this “tip” is terrible. I can’t see why anyone would ever use it. The administrator password is a huge part of the Linux security mindset, and by using it you are constantly reminded to think before you act.

  23. Bobster says:

    Regardless of “security risks”, I use this on my “one user only computer. Thank you for the great web site and the information contained within.

  24. grasscap says:

    While it’s true that this may open a security risk, in some cases it is desired. It really depends on what you are doing. I have a server for hardware debugging, and what I need is to make sure every time I make some hardware changes, ubuntu can still boot and work. There is no data on the server so I disabled login password and sudo password. I like it. Thanks!

  25. bobsongs says:

    Context. I suppose folks are considering their own local context in their comments. If a father reads this tip and wonders what his two teenaged self-appointed hackers would do, yes: he would shake with fear, never returning to this page.

    But someone who lives alone who has an experimental machine may not really care what happens. Especially if that Ubuntu PC is not regularly connected to the Internet. This would allow her/him to make easy modifications without sudo’s password.

  26. bobsongs says:

    Context. This site is called “Ubuntu Geek”. Its purpose is to offer geek-level tips. Y’know, those: “I-wonder-how-I-would-do-this” suggestions for GNU/Linux users who may be expatriots from M$ products, like myself.

    Linux is… how can I put it? Huge. So while this writer may not release sudo’s power to his family, he has discovered yet one more interesting aspect to Linux: the visudo file.

    Consider: the authors of this site have faith its readers will apply tips as the need arises rather than in a haphazard manner. There is no slogan or banner saying: “All tips must be applied”. So use these offerings with appropriate discression.

  27. reason says:

    I’m sorry, but I think there is a lot of confusion out there. half the reason windows is full of viruses and trojans is everyone uses it. As linux becomes more popular to users, so will it be to the malware douches.Obviously it is more secure than windows, but people here seem to think this security comes from the password prompt?

    The password prompt is one of the most irritating things for those who no what they are doing and the benifit is massively over-hyped here. What does it do? it requires the user to authorise a process the user initiated, and under default settings comes up all the time. This inevitably means that people just get used to automatically punching out their authorisation.

    Come on people, malware is not called ‘virus.deb’ the whole point is that it tricks you and the password prompt gives you false hope. You should always be certain of anything you download and doubly so of anything you install – the prompt cannot save you from yourself.

  28. fshagan says:

    Looks like it will be very useful in my HTPC build; dealing with password prompts is one of the annoyances you don’t want to have while trying to “type” using a remote’s number keys.

  29. vigge_sWe says:

    Well, it seems like you all are having an illusion that Windows users get infected because Windows has not the same password prompts.

    Wrong. They get infected for carelessness. They run every single program they get their hand on, they visit every link they can find, they run every command just to see what happens.

    I personally never ever got a virus on my Windows partition, because I know what I do. I know how to stay safe. adblock+ for firefox and you’ll never get any of the viruses that comes from ads (in my guess, 70+% of all viruses comes from ads). Avast! and you’ll never get any virus you would download by mistake or not, avast! scans for virus while it downloads and blocks the connection if it detect it as a virus. myWOT for seeing if a site is safe or not.

    Now, I was a windows user and I recently switched to Ubuntu because of some faulty RAM sticks Win7 didn’t like. I believe as I never got a single virus or malware on windows (if it is so unsecure as you state (which I believe it isn’t)), I do not need extra protection on a system with far more less malware than windows. The password prompts are just annoying. And why do I need to auth twice to change proxy host??

  30. Olav says:

    Ok, so I don`t feel like I need to disable every password promt. But how do I disable the promt that comes when I reopen the lid on my laptop after a break? I already disabled the password for the start-up, (part of the installing options!) so it is pretty annoying that I must type passwords for just opening the laptop. In the end this only compromises my security, because I will end up telling people the password every now and then, for example when having friends over and I let them use the computer..

    (Or could I at least ave different passwords for administration tasks and general “log-in” ??)

Leave a Reply

Your email address will not be published. Required fields are marked *