≡ Menu


How To Add, Delete, and Grant Sudo Privileges to Users on a FreeBSD Server

I'm setting up a new FreeBSD server. I do not want to use a default root user who has full system access. How can I setup and grant sudo privileges to users on a FreeBSD VPS or server?
[click to continue…]

-bash: sudo: command not found Error and Solution

I'm typing the following command:

But, getting the error:

How do I fix this problem under Debian / Ubuntu / RHEL / CentOS Linux?
[click to continue…]

CentOS / Red Hat: Sudo Allows People In Group Admin To Run All Commands

I like the way Ubuntu Linux works - all people in admin groups should able to run all commands after running it via sudo "command-name". How do I setup sudo under CentOS or Red Hat Enterprise Linux to allow all members of the 'admin' group to run all commands?
[click to continue…]

UNIX / Linux: Send E-mail When sudo Runs

I'm not told to use the root user to perform activities that do not require it. I've configured sudo for myself and for other web developers so that they can restart MySQL or Apache web server. How do I send email when sudo run by one of my user? How do I keep track of user login done via sudo command?
[click to continue…]

Sudo is Not Prompting For a Password When Re-executed Second Time

I use sudo to provide permissions and command execution rights to other users under UNIX and Linux operating systems. However, I noticed something strange about sudo. When executing sudo, it will prompt for the user's password the first time, but sudo no longer requires a password anymore when re-executing it. Why? Is this is a security risk?
[click to continue…]

sudo: Sorry, you must have a tty to run sudo Error on a Linux and Unix

I'm trying to run the following command:

ssh user@box.example.com sudo command1 /path/to/file

But, an error is displayed follows:

sudo: sorry, you must have a tty to run sudo


sudo: no tty present and no askpass program specified

How do I fix this problem on Linux or Unix based systems?
[click to continue…]