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 can I execute commands as another user with their .bash_profile instead of the current user's?

I want to run a command as a not-root user in a startup script (rc.local). The command I want …

linux sudo init su .bash-profile
Mysql works with sudo, but without not. (ubuntu 16.04, mysql 5.7.12-0ubuntu1.1)

I have Ubuntu 16.04, and Mysql 5.7.12-0ubuntu1.1. When I type: sudo mysql -u root I can login into mysql console, …

mysql database ubuntu mariadb sudo
su and sudo in a shell script

There is a shell script (/bin/sh, not bash) that requires root permissions for execution. If it is ran by …

linux shell sudo su
How to install a gem globally without sudo using rbenv?

I am using rbenv and I am trying to install sass without success. So, I installed rbenv via Homebrew, then …

ruby gem sudo rbenv
Running external commands through os/exec under another user

Using the os/exec package, I want to run an external command on a *nix OS, on behalf of another …

go exec sudo
Packer build fails due to tty needed for sudo

My packer build is failing with the following message: sudo: sorry, you must have a tty to run sudo. My …

vagrant virtualbox sudo packer
VSCode in WSL: how to sudo a root file so I can edit it

WSL v.1 -- VSCode v1.40.1 (using 'Remote - WSL' extension 40.3) How to open a root-owned file for edit using sudo …

visual-studio-code sudo windows-subsystem-for-linux vscode-remote
Install rst2man failed for varnish agent [fix]

I'm trying install varnish agent on ubuntu server using virtual box. There is a message in the middle installation process …

package sudo varnish apt-get ubuntu-server
Cloud Platforms- sudo: unable to resolve host

I use linux for my cloud based servers on Amazon-EC2 and openstack. When trying to run: sudo chhown ubuntu somepath …

ubuntu amazon-ec2 sudo openstack
Generate script in bash and save it to location requiring sudo

In bash I can create a script with a here-doc like so as per this site: http://tldp.org/LDP/…

bash sudo heredoc