Ubuntu

From Hostek.com Wiki
Jump to: navigation, search

__FORCEOTC__

This article contains information related to common questions or issues related to Ubuntu VPS servers.

How to prevent sudo from prompting for a password

These are instructions to prevent sudo for prompting for a password each time it is used.

Step 1 - Update sudo configuration

To prevent sudo from prompting for a password, you must modify the sudo configuration. You can use the following command to edit the configuration:

sudo visudo

Modify the following line in the configuration:

BEFORE:

%sudo ALL=(ALL:ALL) ALL

AFTER:

%sudo ALL=NOPASSWD: ALL

Save the configuration by entering: CTRL-X, Y


Step 2 - Verify you are a member of the sudo group

In order for this change to work for your user, you must also be a member of the sudo group. Test running a command with sudo. If you are still prompted for a password, then run the following command:

useradd -G sudo YourUsername

(replace 'YourUsername' with your actual username)


Additional Information

Sudo also has the ability to prompt for password on specific commands. See the below documentation for details on advanced sudo configuration.

Ubuntu documentation for sudo:

https://help.ubuntu.com/community/Sudoers


How to Send Mail/Email Externally from ubuntu Server

Change the mydestination setting to be blank in /etc/postfix/main.cf

mydestination = 

Now run this command to reset postfix

sudo postfix reload



Davidd (talk) 13:45, 4 October 2013 (CDT)