How to make sudo remember my password and how to add an application to startup

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


Tag the users or groups who you want to have passwordless access to sudo with "NOPASSWD" in your sudoers file (sudo visudo to edit it). See the man page for sudoers for more details.

You can then create a startup script by editing the appropriate file for the shell you're using -- .profile, or .bashrc, or .cshrc, and so on.


In 10.04 I see that in the Network Manager (v0.8) I have a flag on the VPN Configuration screen (System > Preference > Network Connections , click the VPN tab, select the connection and "Edit") "Connect Automatically" I believe that it fires up the selected connection at login.