The sudo command is a program for some Unix and Unix-Like operating systems, that allows a user to execute programs with the security privileges of another user. Typically those of a superuser or the root user.

learn more… | top users | synonyms

1
vote
1answer
24 views

Nautilus not working on sudo

I've got Trisquel 7 GNU/Linux distro, with GNOME 3.8.4. I'm finding impossible to create a folder in Nautilus, or drag and drop files into the Desktop, out of other options. I find this quite ...
3
votes
3answers
3k views

Windows UAC vs. Linux sudo

Is it correct to say that Windows UAC is conceptually the same as Linux sudo? Can you point out the differences between the two?
38
votes
6answers
44k views

scp to remote server with sudo

I have a file on server A (which is behind a NAT so not directly addressable). The file needs to be copied to server B in a directory restricted to root. I have an account on server B with sudo ...
21
votes
5answers
21k views

sudo vs gksudo. difference?

What's difference between sudo and gksudo?
0
votes
0answers
8 views

How to automount in ChromeOS? Biggest partition not mounting at startup on my Chromebook

I was pretty excited to realize there's a Chromebook tag on here on SuperUser, very cool! Not finding this answer on SO or SU or after a lot of Googling. Question is: My biggest partition (9Gb) ...
-1
votes
0answers
15 views

Iptable entry gets vanished in an hour in oracle linux 6

I carried out the following steps to create a port-forwarding rule: sudo iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 443 -j DNAT --to $ipaddress:10443 sudo iptables -A FORWARD -p tcp -d ...
0
votes
1answer
27 views

Corrupted sudoers file preventing me from using sudo

I attempted to add another user to the sudoers list on my Raspberry Pi running Debian (Raspbian Jessie kernel ver 4.1). While doing so I entered the entry in wrong and I keep getting these errors ...
2
votes
2answers
330 views

Can only use some commands as sudo

I have had a bit of a problem with some commands lately, not working as intended. I wanted to fiddle with some Markdown and try it as a substitute for some simple HTML pages, so I looked into some ...
0
votes
1answer
39 views

Is there a way to set up a warning before executing some commands in the terminal?

There are some terminal commands that are proficient at destroying large swaths of data very efficiently. Like: sudo rm -rf /* or rm -rf /*. I want to set up a warning that will show up, whenever ...
5
votes
2answers
2k views

Wireshark: Accessing USB Bus Interfaces without sudo

I am trying to monitor some USB traffic using Wireshark on Linux (Ubuntu). If I start Wireshark as my normal user without root privileges, the USB bus interfaces are not listed. If I sudo wireshark ...
1
vote
1answer
17 views

How to sudo using another user's account password from a script?

I have a bash script running as user, a user account with no evaluated privileges. The machine has a second account admin which has sudo privileges. There is no root password set. The script knows ...
5
votes
4answers
6k views

Can't install Parallels Tools on Debian 7.2.0

(Parallels Desktop 9, latest version) As per instructions, I switch to root: $ su - root $ whoami root $ echo $EUID 0 and then execute the installer: $ cd /media/cdrom0 $ ./install and I get ...
0
votes
1answer
15 views

sudo ssh-add /root/.ssh/id_rsa return error

I m trying to save ssh authentication with the command ssh-add for sudo usage: linux$ sudo ssh-add /root/.ssh/id_rsa Could not open a connection to your authentication agent. but as indicated it ...
1
vote
2answers
3k views

localhost in sudoers

There is no chance of an internal attack, so I would like to give sudo privileges to users at the local computer using sudoers. I tried these lines separately: %admin localhost=(ALL) NOPASSWD: ALL ...
-1
votes
1answer
24 views

WinSCP/PuTTY: Cannot move file on server via sudo: Permission denied

I have uploaded a file to a remote Linux server. current directory is: /home/user/file.war Now i want to move the file into tomcat webapps folder and overwrite the existing version: The directory ...
1
vote
1answer
40 views

Have output of 'sudo' script printed to same Powershell window?

I found this 'sudo' script online: function Elevate-Process { $file, [string]$arguments = $args; if([System.IO.File]::Exists("$(get-location)\$file")) { $file = ...
18
votes
4answers
11k views

Why does the system have /etc/sudoers.d? How should I edit it?

Last time, I asked about the risk of these (in /etc/sudoers): user_name ALL=(ALL) /usr/bin/vim /etc/httpd/confs/httpd.conf %group_name ALL=(ALL) /usr/bin/vim /etc/httpd/confs/httpd.conf ...
0
votes
2answers
4k views

Problem using sudo on cygwin

I am trying to install the python-brisa framework on Linux. When I try to use the sudo command, it gives me the error "command not found". I am running the following commands: $ cd file $ sudo ...
0
votes
3answers
4k views

Cygwin missing sudo

I am trying to run a linux script on my Windows machine using cygwin. I have already read and tried the solutions from there's no sudo command in cygwin, without any success. I have a script ...
2
votes
1answer
150 views

Are changes to El Capitan's SIP configuration file persistent?

If you toggle System Integrity Protection off to tweak some things, unload daemons, delete apps, etc., will those changes survive toggling SIP back on and re-launching the machine, or will the changes ...
0
votes
2answers
56 views

How to use linux to not get crazy with root privileges

I've got a question for you today my dear Linux friends. I'm a windows user primarily. I use it for my work, watching movies, listening to music, playing games, browsing the net and everything else ...
7
votes
4answers
9k views

How can I start a program as root using the window manager?

I sometimes want to start a graphical program explicitly as root. For now I'm starting a terminal and sudo the desired applicaton. But is there a way to start an application as root directly from its ...
1
vote
2answers
66 views

Problems with sudo privileges as admin in OSX

I am a admin on my Mac with OSX and I have enabled root user. When I try to use the terminal without typing sudo it does not seem to recognise my privileges as an admin, but it works fine if I type ...
9
votes
2answers
5k views

Can I install Homebrew without sudo privileges?

Homebrew nicely allows package installations without sudo privileges, but it seems that I need admin privileges to install Homebrew itself. I'd like to install Homebrew in a Mac environment where I ...
0
votes
1answer
68 views

Error executing remote commands with ssh using sudo user

The following command is failing: ssh -t user@server-01 sudo -iu suser "cd /opt/jboss ; ./portal.sh stop" I getting: bash: ./portal.sh: No such file or directory How can I change directory ...
5
votes
2answers
2k views

Practical (closer to the classical Linux one) way to use (automate) SUDO for CygWin

Being able to use sudo commands in CygWin is useful, and faster than opening an elevated shell: Luis@Kenobi /cygdrive/c/Users/Luis $ net user /add TestUser System error 5. Access denied. Luis@Kenobi ...
3
votes
1answer
72 views

Add user to SSH group safe?

I want to control who can log in via SSH on my server. Is it safe to add the group 'ssh' to the users who are allowed to login in? I see some distros use system groups in the user's ID and others ...
0
votes
1answer
62 views

sudo to any user without a password

If sudo can be configured to no password such as: bob ALL=NOPASSWD: ALL Then how can you configure sudo to be able to sudo to any user without password ? So that sudo -u domainnameuser.com mkdir ...
0
votes
0answers
26 views

Subversion sudo svn update changes file ownership and rwx

I'm limiting permissions on a certain file, settings.py in my svn-linked directory so that it can only be read by sudo users and apache, which goes by the username, www-data. So, on settings.py, I've ...
0
votes
0answers
59 views

Bricked my Ubuntu server can no longer start nor login anymore

I installed a virtual host (KVM) with Ubuntu Server 14.04.3 LTS. Now I spend the last week setting up apache, modules owncloud and other stuff. However, everthing worked great until I followed the ...
2
votes
2answers
3k views

Sudo can not find binary [duplicate]

I have a problem. Lately I've installed nodejs (if you don't know what it is, it does not really matter, could be anything else) from sources to /opt/node: $ ls -la /opt ... lrwxrwxrwx 1 root root ...
1
vote
0answers
17 views

Run script as certain user — depending on group membership

I'm trying to run a script which calls another server through SSH (through Pub/Priv key). However depending on the user (or better said, his/her group membership) who runs the script through sudo, I'd ...
1
vote
1answer
41 views

What other than login and sudo is a Linux password for?

I've got a Linux development machine on which I've given some people key-based ssh access (password login is disabled). The users I've given access do not have sudo rights. So today I was wondering, ...
1
vote
0answers
21 views

Stuffed up sudoers file

I have managed to stuff up my sudoers file and am locked out of my server. Is there any way to get back in? To be precise, I have a single user (call her jane), who used to have sudo privileges for ...
0
votes
0answers
12 views

How do I break out of /home/reveller?

Ubuntu newbie here. I succesfully installed Ubuntu on a VM on Windows. I am now trying to run a localhost website using nginx. I have read tutorials online on how to create your website in /var/www ...
1
vote
3answers
300 views

different behavior: “sudo nmap” vs just “nmap”?

I'm attempting to do a simple port scan with nmap: $ nmap 192.168.56.101 Starting Nmap 6.47 ( http://nmap.org ) at 2015-03-10 19:30 IST Nmap scan report for 192.168.56.101 Host is up (0.0048s ...
1
vote
1answer
363 views

How to set path for sudo commands

If I issue sudo my-command how does Linux look for that my-command? The my-command is in my PATH. I can invoke it without any problem. However, when I invoke it with sudo, I'll get command not ...
0
votes
0answers
40 views

I can't be root

My school gave me a dump with different partition, I have to Work on the linux one, it's a open suse modified by the school.. sometimes I need to be root for install stuff with zypper example, they ...
11
votes
4answers
31k views

How can I switch back normal mode from sudo mode in Linux and Mac OS X?

I use sudo su command to do something in Mac OS X but don't know how to switch back. Hope you guy can do me a favour.
18
votes
4answers
5k views

sudo keeps asking me for my password in fish shell

sudo in Ubuntu keeps asking me for my password for every command. Previously, I only had to enter the password once, and then it would be remembered for a period of time. This recently changed, ...
0
votes
0answers
19 views

Startup script launched with password-less user fails

I created a user with a password, installed an application with this user, then removed the password passwd --delete bower. When starting the following script using sudo start myscript the error ...
0
votes
0answers
9 views

How to run adb as super user in ubuntu

I have android platform tools which has adb. I know how to run commands on terminal but I don't know how to run an adb file (which is inside that platform tools folder) as super user.
7
votes
1answer
2k views

Ubuntu 15.04: suspend from console without sudo

For years I have been able to suspend my Ubuntu-based machine from regular account using dbus-send --system --print-reply --dest="org.freedesktop.UPower" /org/freedesktop/UPower ...
5
votes
2answers
408 views

Why should I really disable root ssh login?

I always read I should disable root login for SSH and login with a user which has sudo. But where is the difference between: ssh root@vps and ssh myuser@vps sudo -i I don't have physical ...
0
votes
1answer
122 views

Avoid sudo password /etc/apt/apt.conf.d/

How can I avoid 'sudo' in this command? ssh -t root@$machine -x "sshpass -p 'ubuntu' ssh -t ubuntu@$address -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/nul -x 'sudo mv 00proxy ...
1
vote
0answers
52 views

Installing SSL on Shared hosting server

I have beta invitation of letsencrypt.org I followed there documentation here . But i am unable to install there packages because i have shared hosting server which does not allow to use sudo ...
2
votes
1answer
61 views

Whitelisting commands a user can use with sudo

I've been attempting to set up a whitelist of commands a user can run on my system. The server I'm using is running CentOS 7. What is the syntax that should be used to only allow a certain group of ...
-1
votes
1answer
76 views

How do I run a command as another user?

I’m using the following version of Linux [me@ip-99-99-99-99 myproject]$ uname -a Linux ip-99-99-99-99 99.99.99-99.99.amzn1.x86_64 #1 SMP Mon Sep 14 23:20:33 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux ...
0
votes
2answers
3k views

How to allow user to preserve environment with sudo?

I'm running into the following error trying to allow some environment variables to pass through to the new environment when running sudo: sudo: sorry, you are not allowed to preserve the environment ...
0
votes
2answers
4k views

How do I fix an invalid /etc/sudoers file if root access is disabled?

This pertains to my Raspberry Pi, on which I have Raspbmc installed. I do realize that there is a Raspberry Pi StackExchange site, but I figured I might get more eyes on this problem here. The issue ...