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
13 views

bash requesting password on every invocation of sudo

Within a single bash session I am repeatedly re-running a command prefixed by sudo. Typically the password should be requested once and then cached. However, the present behavior is that the password ...
1
vote
2answers
29 views

How to execute sudo NOPASSWD command on other server via SSH

I have read all the post related to the issue. But If you can see mine as well and give suggestion. I am trying to do passwordless SSH and run a script on remote server. But Sudo access ask for ...
2
votes
1answer
22 views

Need application to run without root access

i try to build my local services system inhouse, and to thant i need to learn how i can give access to a single user with out type a root access when i do it, or i need to know how i can call the ...
11
votes
6answers
4k views

sudo unable to write to /etc/profile

I am following the instructions on this site for Grails installation, but am not able to write to /etc/profile like it instructs. sudo echo ‘JAVA_HOME=/usr/lib/jvm/java-6-sun’ >> /etc/profile ...
8
votes
3answers
4k views

Can't write to file /sys/class/backlight/acpi_video0/brightness (ubuntu)

I am trying to change the brightness by overwriting the value on this file: sudo echo 5 > /sys/class/backlight/acpi_video0/brightness -bash: /sys/class/backlight/acpi_video0/brightness: Permission ...
0
votes
1answer
32 views

Jenkins Docker image has no make or sudo

I'm trying to set up CI on AWS using the Jenkins image from the Docker hub. I've gotten a few hours into the process (configuring for a Node project), and I've now realized that a few of my npm ...
4
votes
1answer
2k views

'user is not in the sudoers file' but actually is

I have already read a lot of posts about enabling sudo-access for a specific user but those couldn't help me so far. The situation is: I'm running Debian Testing. On the system there are only two ...
2
votes
2answers
35 views

`sudo adduser username admin` leads to `adduser: The group `admin' does not exist.`

I'm trying to add a user to the sudoers file with the simple command sudo adduser username admin but I get adduser: The group 'admin' does not exist. So I checked out the sudoers file (sudo visudo ...
0
votes
2answers
57 views

ZFS send/recieve over ssh on linux without allowing root login

I wish to replicate the file system storage/photos from source to destination without enabling ssh login as root. I've tried a number of different combinations such as: sudo zfs send -R ...
2
votes
1answer
815 views

Set default editor for crontab -e invoked with sudo

I'm using Bash on Debian Squeeze. I just read this topic: change default text editor for crontab to vim I have exported both variables VISUAL and EDITOR to vim for normal user and for root. And this ...
0
votes
0answers
9 views

How can I set system-wide timestamp-timeout?

as I understand adding Defaults timestamp-timeout=5 to my sudoers file makes the current terminal remember my password. After typing my password in one konsole and opening another terminal or ...
0
votes
1answer
16 views

Problems with PATH variable as sudo user

I'm having trouble to understand how the PATH variable is affected by sudo. I can run the command activator as a normal user because I've added the path where this application resides to that user's ...
2
votes
0answers
42 views

Can't resume editor running as root

For years, when I have been working over an SSH connection, I will run sudo vi ... to edit a config file. If I need to do something on the command-line, I'll hit Ctrl+Z to suspend the editor, do ...
0
votes
1answer
16 views

Make a group be able to run shutdown command without entering a password (CentOS)

I used the command visudo -f /etc/sudoers to edit the sudoers file. How do I make a group be able to run the shutdown command without supplying password?
0
votes
1answer
14 views

Program built from source is unrecognized by the terminal but if i do it with sudo

i've built a program from source in /usr/local/sbin but now if in a terminal i write "program-name" the terminal say that the command was not found. The program is seen by the terminal only if i do ...
0
votes
2answers
3k 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 ...
1
vote
2answers
2k views

Cannot change the desktop wallpaper in Ubuntu 14.04

I tried installing GNOME packages to Ubuntu 14.04(unity). I used these codes. sudo apt-get install gdm sudo apt-get install gnome-shell sudo apt-get install ubuntu-gnome-desktop ...
0
votes
1answer
39 views

The logic of Disabling Root Login

Ubuntu 14.04 VPS user here. My VPS was hacked twice. And the third version is up. Fingers crossed. The mistake I made in the first two was that I had root + password login enabled. I've learned ...
1
vote
1answer
24 views

strace to discover sudo password persistence location

strace/dtrace/ltrace ... useful for lots of things, from finding hidden access violations to network socket tracing, but maybe it can't see all. I haven't been able to figure out using strace (it ...
0
votes
2answers
72 views

Disable Root — what all issues will arise?

I have a linux server (Ubuntu 14) that I access using root and SSH keys (i.e. no root password). I have also created a non-root-user (and a corresponding non-root-user's-password) with sudo ...
2
votes
1answer
62 views

Allow unprivileged user access to specific privileged files

I have a system running hardened Gentoo and I have installed Xorg, Fluxbox, and Conky together to create a minimal window manager desktop. Within this system I have 2 main users, root and my normal ...
3
votes
1answer
517 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 ...
1
vote
1answer
58 views

My admin user has completely lost the use of sudo (only gets 'permission denied')

OS X 10.8.5 I first realized the problem trying to delete software from a Japanese wireless carrier when I installed their client while I was there. Then I realized I actually can run no command ...
0
votes
1answer
22 views

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

Please how can 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 ...
0
votes
0answers
15 views

World writable sudoers, no root password set

I have Kubuntu 14.04 installed on USB flash drive. Yesterday by accident I did chmod 777 /etc/sudoers. Now I can't set it back to 0440, because I get an error something along the lines of 'File is ...
8
votes
7answers
22k views

Sudo - is there a command to check if I have sudo and/or how much time is left?

(Originally posted on Stack Overflow. They suggested I try here instead. Here's the original post: ...
0
votes
0answers
27 views

Why does sudo -n on Mac OS X always return 0?

It looks like sudo -n on Mac OS X (10.10.3) always returns 0 as a return code. So something like this will always show 0, regardless of whether the user has authenticated with his password first: ...
14
votes
5answers
15k views

sudo vs gksudo. difference?

What's difference between sudo and gksudo?
1
vote
2answers
77 views

sudo alternative to allow certain user to execute chmod from a program

I would like to allow a certain user who does not own the files in a directory to execute chmod on them. Interactively, I know that I can do this by configuring sudo with the sudoers config file(s), ...
2
votes
1answer
174 views

sudo: effective uid is not 0, is sudo installed setuid root? for normal users

strangely I cannot run the sudo command for every new account I create that is not root. The server is completely new and wasn't touched so I don't know what's wrong. for every command I try to run ...
3
votes
1answer
187 views

one sudo for multiple terminals

Sudo root permissions are given for specific time, but only for one terminal. If I want to use sudo in another terminal in that time period, I have to type password again. How to force sudo to works ...
2
votes
4answers
3k views

Change the sudo su shell

Whenever I run sudo su from my normal zsh (which uses the oh-my-zsh framework), I'm forced to use the old Bourne shell (sh) by default (obviously; this is standard behaviour on most *nix-like ...
0
votes
1answer
37 views

How to restore Debian server's /var/lib datas

I made a big mistake : While administrating and making settings, I accidentally deleted /var/lib folder. The result is that I can no longer use any dpkg commands, so I"ve lost my mysql database. I of ...
1
vote
1answer
25 views

Always run a program as root without typing sudo on RHLE?

I have a program called 'myprogram'. I want to be able to type, from the cmd line: >$ myprogram and have it automatically run as root. As in I want the above command to be translated to, >$ ...
0
votes
2answers
54 views

sh -c in background

Original version: How to run sudo sh -c "command" in back ground In a terminal sudo sh -c "command" & starts in background but as soon as I press enter, the process exits [test@localhost ...
10
votes
5answers
27k views

command not found when using sudo

There are a few question on the site that seem related to my problem but I could not find a solution in any of them. My operating system is Ubuntu 12.04. I have mvn installed in ...
1
vote
2answers
14k views

Reset root password or enable sudo on MacOS X Mavericks

I have a MacOS X Mavericks installation with a single user Admin and empty password for that account: Now I'm trying to install Cocoapods, but can't use "sudo", because I don't know the root ...
26
votes
5answers
85k views
1
vote
2answers
3k views

What is the default path for sudo command?

What is the default path of sudo command? I checked in some Linux flavours and some solaris flavours, it is: /usr/bin/sudo If a Solaris machine is not bundled with sudo, where will it get installed ...
1
vote
0answers
26 views

Deny access to a specific folder for a sudo user

So here is the case: I am root in an Ubuntu system. I want to give a user (say username is X) permission to execute any command but at the same time I have a folder that I want no one to be able to ...
4
votes
1answer
16k views

How to change user in WinSCP?

I'm using WinSCP to access Unix computers. How can I change user after I have logged into a Unix server using WinSCP? E.g. I have personal account in Unix computer A. I can log into this computer ...
0
votes
0answers
25 views

sudo-ldap using LDAPv3 for Mac OSX - Possible?

I have been able to setup Mac OSX to authenticate via LDAPv3 and KRB5 to a Fedora FreeIPA server. Took some work - but got it to work. My question now is if it is possible to configure the sudo ...
0
votes
1answer
179 views

Require bash script to be run with sudo (not as root user)?

I want to require a bash script to be run as the current user with sudo, but prevent it from being run if it was executed as the root user directly. This is because I'm doing some setup actions for ...
-1
votes
1answer
32 views

Problems writing a script to build FFmpeg from source

I’m on Ubuntu 12.04 LTS and I’m trying to write a script that will build FFmpeg from source; with the right flags of course. I’m following the instructions here. I’ve nailed most of it except the very ...
3
votes
1answer
73 views

How do I trick Nautilus to use “sudo mount” instead of just “mount”?

Thanks to new "security fixes" in mount or mount.cifs (I'm not sure which) it's no longer possible for normal users to mount anything, even if they are explicitly allowed using the user, users or ...
1
vote
1answer
69 views

Adding group permissions with sudoers with NOPASSWD still prompting for password

Fedora 20, clean install. I added the following lines to my sudoers file with visudo: %power ALL=NOPASSWD: /sbin/shutdown I then created group "power" and added my account to this group. ...
1
vote
0answers
47 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
votes
1answer
56 views

Don't have permissions to save file in Mac OS X using Vim, even after using sudo

I’m trying to edit the following file on my machine: /etc/apache2/httpd.conf First I got an error stating that I don’t have permissions to change the file, fair enough. I then used sudo but I still ...
1
vote
1answer
338 views

How can I redirect OS X dtruss output when running with sudo?

I'm running dtruss on Mac OS X 10.9. Simple example is: sudo -c ls But I'd like to capture the dtruss output into a file. I saw something that suggests that I can do something like: sudo bash -c ...
1
vote
1answer
3k views

Permission denied in Amazon EC2 while accessing Tomcat 7 folder

I am trying to copy a log file from an Amazon EC2 instance to my local machine (Windows 7). I am using WinSCP438, which is able to connect to the remote (Amazon EC2) server instance. I am trying to ...