Ubuntu – How to make sudo remember the password and how to add an application to startup


I guess this should be a simple thing for ubuntu users out there. I have two questions.

  1. Whenever I need to run some command that requires permission from root, I run as sudo followed by that command. It would be nice if that does not prompt for password (but I should still be issuing a sudo to make sure that I know what I am doing). How to do this?

  2. Every time I start my system, I go to terminal and start my VPN using sudo vpnc. This is almost everytime! How to automate this to a startup script?

Help much appreciated! Thanks

Best Answer

First Question

  • If you dont want to enter password everytime,then you should edit sudoers file.

    sudo visudo

  • Then add the following line at the end of the file.

    %username ALL=(ALL) NOPASSWD:ALL

    alt text

  • Now if you enter sudo followed by the command it wont prompt you to enter password.

Second Question

  • For your second question you can add that command sudo vpnc to startup applications.
  • To add that command in startup applications Goto System Preferences Startup Applications.

    alt text