Top "Sudo" questions

The sudo command is a program for Unix and Unix-like computer operating systems that allows a user to run programs with the security privileges of another user (normally the superuser, or root).

How to fix 'sudo: no tty present and no askpass program specified' error?

I am trying to compile some sources using a makefile. In the makefile there is a bunch of commands that …

linux sudo tty
npm throws error without sudo

I just installed node and npm through the package on nodejs.org and whenever I try to search or install …

node.js unix permissions npm sudo
How does the vim "write with sudo" trick work?

Many of you have probably seen the command that allows you to write on a file that needs root permission, …

vim sudo
How to use sudo inside a docker container?

Normally, docker containers are run using the user root. I'd like to use a different user, which is no problem …

docker sudo linux-containers
How to pass the password to su/sudo/ssh without overriding the TTY?

I'm writing a C Shell program that will be doing su or sudo or ssh. They all want their passwords …

linux ssh passwords sudo su
How to keep environment variables when using sudo

When I use any command with sudo the environment variables are not there. For example after setting HTTP_PROXY the …

linux environment-variables sudo
How to write a shell script that runs some commands as superuser and some commands not as superuser, without having to babysit it?

I want to write a shell script to automate a series of commands. The problem is some commands MUST be …

unix sudo
npm install errors with Error: ENOENT, chmod

I am trying to globally install an npm module I just published. Every time I try to install, either from …

node.js permissions installation npm sudo
How to run script as another user without password?

I have script.sh that must be run as user2. However, this script can only be run under user1 in …

linux bash sudo su sudoers
How do I use sudo to redirect output to a location I don't have permission to write to?

I've been given sudo access on one of our development RedHat linux boxes, and I seem to find myself quite …

linux permissions sudo io-redirection permission-denied