Sudo no password

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kari
    Junior Member
    • Sep 2009
    • 21

    #1

    Sudo no password

    Here’s how you can set Ubuntu to not prompt for your password when using sudo.
    Launch a terminal window and enter the following command:

    # sudo visudo

    Visudo is a tool used to edit the configuration file of sudo . The command will prompt your for your password. Enter it one last time. The configuration file will open in a text editor, most likely Nano. Scroll down to the end of the document and add the following line:

    username ALL=NOPASSWD: ALL

    Replace username with the username of the user you want to allow a passwordless sudo. So if the user is kari, you would enter:

    kari ALL=NOPASSWD: ALL

    Save and exit the file. Log out, log in as the user kari and test out your new passwordless sudo.

    Note: this is something that is not recommended if you are using your computer in a public place or at your work
  • eleos
    Newbie
    • Nov 2009
    • 1

    #2
    Thnx!
    Very usefull post

    Comment

    • hackhain
      Newbie
      • Feb 2010
      • 6

      #3
      Originally posted by kari
      Here?s how you can set Ubuntu to not prompt for your password when using sudo.
      Launch a terminal window and enter the following command:

      # sudo visudo

      Visudo is a tool used to edit the configuration file of sudo . The command will prompt your for your password. Enter it one last time. The configuration file will open in a text editor, most likely Nano. Scroll down to the end of the document and add the following line:

      username ALL=NOPASSWD: ALL

      Replace username with the username of the user you want to allow a passwordless sudo. So if the user is kari, you would enter:

      kari ALL=NOPASSWD: ALL

      Save and exit the file. Log out, log in as the user kari and test out your new passwordless sudo.

      Note: this is something that is not recommended if you are using your computer in a public place or at your work
      Beware of that you are serving yourself in silver plate with root privileges. That's why we are using sudo with pass for your security.

      Comment

      • zerofool2005
        Newbie
        • Dec 2008
        • 17

        #4
        They are right. You should only run things in root if you really need to.

        Root is dangerous if mis-handled

        Comment

        • jeremias
          Newbie
          • Jul 2010
          • 1

          #5
          Hi

          Very useful, post thank you!

          Jeremias

          Comment

          • rwl408
            Newbie
            • Jul 2010
            • 12

            #6
            Originally posted by kari
            Here?s how you can set Ubuntu to not prompt for your password when using sudo.
            It would be safer to limit the scope of "no password" through CMD_ALIAS. For example, I skip the password for reboot, shutdown, mount, and umount only.

            Comment

            • rwl408
              Newbie
              • Jul 2010
              • 12

              #7
              Originally posted by rwl408
              It would be safer to limit the scope of "no password" through CMD_ALIAS. For example, I skip the password for reboot, shutdown, mount, and umount only.
              By the way, be extremely careful when you "su visudo". It is too easy to mess up things and I had to boot to recovery mode to fix it a few times.

              Comment

              • stealthier
                Member
                • Apr 2010
                • 46

                #8
                I think that you shouldn't do it, cause it is not so good for your security m8. You increase vulnerability with that thing

                Comment

                • mondeo1965
                  Newbie
                  • Sep 2010
                  • 3

                  #9
                  I will never do that on my Ubuntu computer.

                  Comment

                  • radu_gostian
                    Member
                    • Jan 2010
                    • 58

                    #10
                    And that s how you make your account to a root one .
                    Why bother with that account just use root account instead

                    Comment

                    • makikou
                      Newbie
                      • Oct 2010
                      • 1

                      #11
                      very usefull post, thanks for post

                      Comment

                      Working...