November 17, 2009 · Security · Email This Post
Share

If you're new here, you may want to subscribe to my RSS feed and if you have questions related to your ubuntu system post question to our forums. Thanks for visiting!

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

  • Share/Bookmark

Related Articles

26 Comments to “How to disable password prompts in Ubuntu”

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

Leave a Reply