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

10
votes
3answers
4k 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
0answers
16 views

What is the best way to create a local development environment in a linux machine without being in sudoers

I use a workstation for my development but it does not include all the libraries for my case. I like to install them for my use without any system wide effect. How should I proceed this is a linux ...
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 ...
4
votes
1answer
18k 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 ...
1
vote
0answers
12 views

How do I get the sudo permissions to enable root from Terminal?

I have an MacBook Pro constructed in mid 2014. I do a lot of work on it, and my son does his gaming on it, but when I upgraded to OS X Yosemite, my account (which was the administrator) got demoted to ...
12
votes
5answers
31k 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 ...
0
votes
1answer
22 views

Meaning of parameters in sudoers file in RedHat

HI can you tell me what is the meaning of each and every parameter meaning of this line of sudoers file in RedHat machine? steve CSNETS = (operator) /usr/local/op_commands/ I know first ...
1
vote
4answers
6k views

How can I run commands in PowerShell with Administrator permissions?

I would like to run commands in PowerShell with Administrator permissions? How can I do that? I have tried to start PowerShell with the runas command, but PowerShell is closed immediately after I ...
1
vote
2answers
3k 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
16 views

How to download file from remote server to windows without sudo

I have a VM running Ubuntu 14.04. I seem to have broken sudo on my account: sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set I do not have root access. I am looking to ...
0
votes
1answer
84 views

Install GDrive on Seagate Central Linux

Is there a way to install Google Drive for MontaVista Linux 6? I have Seagate Central NAS and it does not have option to sync with GDrive through the standard interface. It has embedded Linux ...
0
votes
2answers
42 views

Accessing shell variables inside 'sudo' block : export doesn't work

I am writing a script to fix a missing 'F' letter in a mail log file. The mail log file is continuously updating. I am getting a file name, after that I am doing 'sudo su' to get superuser access. ...
2
votes
3answers
1k views

Allow limited cp access to a sudo enabled user

We have several tier2 admins whom have very limited admin rights granted via sudo; As they have limited experience we really want to put them into a tight set of operations they can perform. One of ...
1
vote
0answers
34 views

Restrict an admin user from using sudo on os x

I have multiple admin users on my mac. Is there a way I can block a particular admin user from executing sudo on OS X? My understanding is that if the user name is "abc", abc ALL=(ALL) ALL in ...
0
votes
1answer
31 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 ...
9
votes
4answers
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 ...
1
vote
0answers
14 views

Root Privileges and Risky Commands

user ALL=(ALL) /usr/bin/vim /etc/httpd/confs/httpd.conf user ALL=(ALL) /usr/bin/less /etc/httpd/confs/httpd.conf I think if these scripts are written in sudoers, "user" can cause problems on the ...
0
votes
2answers
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 ...
0
votes
2answers
1k views

Execute a remote command after sudo - su anotheruser in Rundeck

I'm new with Rundeck and completely amazed with it and I'm trying to execute a job and my scenario is detailed below: Rundeck is configured with ssh passwordless authentication for user master ...
0
votes
3answers
225 views

Why sudo python and python in terminal start two different versions python?

I had python 2.6 in my server to begin with. Then I downloaded python 2.7 and installed using make and make altinstall. When I try just python in the terminal it opens up python 2.7 but sudo python ...
1
vote
0answers
16 views

sudo --set-home decide based on command

I was wondering if there is a way to make sudo set the --set-home flag based on the command being executed. e.g. in most cases I do not want the --set-home flag to be set, but for npm, I want it to ...
1
vote
0answers
37 views

How to rsync root files over non-root ssh?

I have two machines, both providing no root login, but provide sudo root access. Now I like to initate a rsync transfer of root files over ssh. Is there an easy way make the the root access given by ...
2
votes
1answer
102 views

usermod returns “group 'thegroupname' does not exist” for known group

As a member of sudo can I add myself to a group I don't belong to? $ getent group thegroupname thegroupname:x:123794798:administrator,users,auser,moreusers,manymoreusers $ sudo usermod -a -G ...
0
votes
1answer
26 views

sudo NOPASSWD for particular paths

How can I enable NOPASSWD for a user to do anything in several paths? For instance read/write/execute any file in /etc/init.d and /opt/?
1
vote
1answer
46 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 ...
1
vote
4answers
155 views

When copying directories with sudo it copies just the first level of its hierarchy

This question was also asked here. When I copy some directory (dir) recursively with sudo in bash it copies just the first level of the dir hierarchy, but when used without sudo it copies the dir ...
0
votes
2answers
32 views

Logging into sudo with a hashed password

I am curious as to whether or not I can pass the sudo password prompt the hashed sha512(?) password and log in to root that way. So it might look something like this: [user@device ~]$ sudo su - ...
0
votes
3answers
1k views

How to determine if an app was launched via open as root on Mac OS X?

In OS X, how can I determine if an app launched via the open command was launched with elevated permissions? I tried as an example sudo open http://www.google.com/, but Activity Monitor doesn't seem ...
8
votes
8answers
23k 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
2answers
59 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: ...
0
votes
1answer
83 views

How to get real root permissions on OS X

I'm a noob with OSX (10.8.5) wanting to install homebrew on an Airbook. Installing homebrew fails straight away because it can't mkdir /usr/local. So I try with sudo - same problem. Trying sudo ...
1
vote
0answers
23 views

Run chromium as different user - Cannot download files

For security purposes, I'm running chromium with a UID different from my main desktop user. user="web" xhost +SI:localuser:"$user" > /dev/null sudo -u "$user" -H -E -s -- chromium With sudo ...
54
votes
10answers
82k views

sudo with password in one command line?

On busy days, I'd like to run $ ./configure && make && sudo make install && halt on the night and go to bed, hoping the application would automatically be installed. But ...
1
vote
1answer
32 views

Use sudoedit to add user to sudo group?

According to the OpenBSD FAQ #10: If you want to give access to superuser privileges without adding users to the wheel group, use sudo(8). According to the OpenBSD man pages on sudo(8): ...
3
votes
1answer
50 views

Asking for another user's password when using sudo

I'm running a home automation package called HomeSeer on a Ubuntu 15.04 server. I have it configured to run with a service account (called "_homeseer"), and I've chown'd the app directory to ...
28
votes
5answers
91k views
1
vote
1answer
64 views

OSX 10.10 locked out of administrator account, not in the sudoers file anymore

It appears my administrator account turned into a regular account overnight. Or, I did something stupid, which is more reasonable but I can for the life of me not figure out what it is that caused ...
3
votes
4answers
2k views

Lost sudo/su on Amazon EC2 instance

I have an Amazon EC2 instance. I can login just fine, but neither "su" nor "sudo" work now (they worked fine previously): "su" requests a password, but I login using ssh keys, and I don't think ...
1
vote
2answers
25 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 ...
0
votes
0answers
42 views

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

I accidentally changed the ownership on my debian web server in /usr/bin and the permissions are no longer root root but instead USER root. How do I get this back everything I am finding says to ...
1
vote
2answers
70 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
35 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 ...
0
votes
1answer
93 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 ...
2
votes
2answers
93 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
100 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
895 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
20 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
40 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
44 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 ...