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

3
votes
1answer
254 views

Can't Get libpam-ssh-agent-auth Working In Ubuntu 13.10

I've been wrestling with this particular issue most of the day, and have been making SOME progress, but I'm still a bit stuck. I would like to be able to authenticate an SSH session using a private ...
0
votes
1answer
69 views

Getting molly-guard to work with sudo

The program molly-guard is a brilliant little tool which will prompt you for a piece of information before you reboot or shut down a system. Usually it asks for the hostname. So when you work a lot ...
2
votes
1answer
486 views

Can't validate mine, sudo nor root in Debian “Jessie” Gnome anymore?

I'm Debian beginner & GUI guy in a bit of trouble? Can't login as sudo/gksu/root/su nor as (main/super)user after removed user password via Gnome-user-settings. History of actions (Probably ...
3
votes
1answer
243 views

How does sudo actually work?

How is it possible for sudo to actually function? If it's just a normal program, couldn't you make the same thing without requiring the user to authenticate, giving anyone with access to a computer ...
1
vote
2answers
151 views

Using the root account on a single-user system [closed]

On Linux systems it is widely considered a best practice using the root account only on occasions that necessitate administrative privileges, or disabling it altogether and relying solely on sudo to ...
0
votes
2answers
228 views

User not in sudo list but can still use sudo

I am running Fedora 17. My user was created during the live cd install and has root/admin privileges. Hence, I use the sudo command to perform root actions. E.g sudo iftop I enter my password and ...
2
votes
1answer
2k views

sudo: must be setuid root

I rented a server (ubuntu 12.04). They gave me a root user account. Next, I went in and created a new user using: # adduser <newusername> And added a password. The new user account works ...
2
votes
1answer
1k views

SSH: remote switch user and execute command under this new user

I am able to connect to remote machine using public/private keys (without password) as user wakatana. On remote machine I am able to issue: sudo /usr/bin/rootsh -i -u root then I type root's password ...
3
votes
3answers
7k views

sudo: Sorry, user root is not allowed to execute

This command fails on OpenSuSE 11.4: root@host# sudo -S -u "coreapp_customer1_d" -g "coreapp_customer1_d" /bin/bash -l -c "mkdir -p /home/coreapp_customer1_d/.ssh" with this message: Sorry, user ...
3
votes
2answers
1k views

Understanding homebrew 'no-sudo' philosophy and questioning FAQ

Having fresh install of OS X, I decided to install python package manager in proper way. So I started googling and found homebrew is the best way. Now I got two questions: from homebrew FAQ: ...
0
votes
1answer
2k views

Running commands as another user on their machine via ssh?

As part of my normal workflow I ssh into another user's machine, switch user to them, run a command, then exit out to my own machine again: ssh hostname sudo su user runcommand exit exit Is there a ...
1
vote
1answer
1k views

Broken sudo on amazon web services ec2 linux centOS

So I had no idea of the dangers of messing with the /etc/sudoers file, and was just trying to make a simple change in there. However, I seem to have put something with incorrect syntax in there, ...
3
votes
1answer
12k 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 comp using ...
1
vote
2answers
2k views

What is required to sudo without a password on ubuntu?

I have got the following line in my /etc/sudoers after editing it via visudo and I am unable to sudo without a password. Does anyone have any ideas on why this is not working properly? myusername ...
2
votes
3answers
3k views

Ubuntu: Getting sudo access as guest

I installed Ubuntu Linux 12.04 a little while ago to try it out and play around with it (hence I have no idea what I'm doing). I tried changing my home directory by editing the /etc/passwd file, ...
1
vote
5answers
262 views

Pre-authorise sudo? (So it can be run later)

I often set my work computer running some time-consuming computations before I go home in the evening. After they're done, I'd like it to shutdown. However, as shutdown requires root privileges, it ...
0
votes
1answer
1k views

How to add yourself to sudoers list?

I was trying to install a package using the command: sudo apt-get install ruby-rvm But I'm prompted with nish is not in the sudoers file. This incident will be reported. I tried to add myself ...
0
votes
2answers
118 views

`sudo rm -rf /` got interrupted leaving the data partially deleted

I ran sudo rm -rf / to wipe out all data, for some reason the execution got interrupted. Now I am left with a shell that only has cd command!!! (ls, sudo, rm, etc got deleted!) What should I do to ...
3
votes
1answer
5k views

Allow users of a certain group to run a command without sudo

I know how to edit /etc/sudoers so that I can run a command as sudo without having to enter my password, however is there a way of allowing a program to be run completely without sudo, by all users of ...
0
votes
1answer
1k 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
1answer
572 views

sudo: source: command not found when executing tcl as sudo

I have a test.tcl (has all permissions) which contains the following- #!/usr/bin/tclsh puts "hello, world" This is how I'm executing my tcl script- sudo source /opt/test.tcl I got the ...
0
votes
2answers
2k 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 it will get installed ...
1
vote
1answer
171 views

default user for sudo command

In my sudo command, if I don't mention username, will it take root as the default user? For example, In the following command- sudo mkdir /tmp/computerLinux/ using which target user will it execute ...
12
votes
1answer
13k views

sorry, you must have a tty to run sudo

I had already asked this question in Stack Overflow, but I've been asked to post it here. So doing the same. I ran this command using my java program- sudo -u <username> -S pwd I got this ...
1
vote
4answers
2k views

Alternative for sudo

I am aware that we can execute a command/script as a super/another user using sudo command. But Is there a possibility where the sudo utility itself is unavailable/removed by the user. If so, what ...
-4
votes
2answers
369 views

Preventing execution of sudo rm -rf /*

Do any Linux distros prevent the execution of sudo rm -rf /* so that people do not accidentally delete their hard drives if they did not know what they are doing?
1
vote
1answer
97 views

Let a user to run a command as a member of a group he does not belong to, using `sudoers`

How can I let a user U to run a command /usr/bin/C as a member of a group G (while he does not belong to the group G), using sudoers on Debian Wheezy?
2
votes
3answers
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
2answers
139 views

How can I add myself to the wheel group without using Sudo or Root commands?

Right now I am sitting at work with the task to attempt to bypass permissions and do anything I shouldn't be able to. I have nothing but a standard User and Terminal. I don't know the administrator ...
1
vote
1answer
87 views

Set timezone for sudo'ed commands

When running as a user, I like to have times printed relative to myself, so I have the TZ environment variable set. But then for example "sudo /etc/init.d/nginx restart" causes nginx to be run in my ...
0
votes
0answers
424 views

Chmod not working on /var/www/

I am running an Ubuntu 11.10 x86 VPS. I have given a user sudo privileges, and for some reason I cannot recursively chmod /var/www/. I am running Nginx with php-fpm, although that shouldn't matter. ...
0
votes
1answer
142 views

tarballing a git branch to a remote server using a sudoer

I have this compound command working for the root user and have been jumping through hoops trying to get it to work for a sudoer (rsa keys, echoing the pwd, supressing tty etc) but I can't seem to get ...
1
vote
0answers
159 views

After rebooting, why doesn't sudo prompt for password when I try to start MySQL server?

I'm having a minor problem, and I'm hoping someone can help me understand why my system behaves this way. By the way, I'm a MySQL + Terminal newbie, so please go easy on me! I've done some due ...
6
votes
1answer
2k 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 ...
1
vote
4answers
86 views

Should you install sudo even if you're the only person using the server?

Should you install and configure sudo even if you're the only person using the server and the only admin?
6
votes
2answers
793 views

Allow user to use sudo command has multiple ways, which one is better?

I am a Linux Newbie, just learning it and using Debian 7.0 Wheezy. I have seen two methods to allow user to use sudo One is to use visudo to modify /etc/sudoers and add following username ALL=(ALL) ...
0
votes
1answer
262 views

How to a sudo command which keeps all environment variables

Example command is as follows, run as a normal user which python /home/me/env/development/python because the PATH environment contains a path that points out to this instance of python (instead to ...
0
votes
1answer
43 views

Why does 'which' give incorrect result?

I am executing on a Ubuntu 12.04 shell the following command: sudo bash -c "echo $PATH; which python" which displays something like ...
0
votes
1answer
691 views

Added user as sudoer but still prompted for password after ssh key-based login authentication

This unanswered question is similar to mine except my situation is simpler. After successfully logging in as user ubtuntu with ssh, any sudo command prompts for the user's password with: [sudo] ...
0
votes
1answer
131 views

why can't a user without root privlidges still sudo -u as himself?

I was writing a simple script that had to be run as 'user'. I run it half the time as myself and half the time when su as the user, so to save time I wrote it as sudo -u user ./doStuff but this ...
0
votes
3answers
2k views

Change owner of the root folder and subfolders (Ubuntu 13.04)

I accidentally set owner of root folder (/) and all subfolders to one user by command $ sudo chown -R 'userName' /* Now I wanna set owner back to root user by command $ chown -R root:root /* But ...
1
vote
0answers
232 views

Moved /lib64 to /backup_lib64 using sudo, now sudo doesn't work on CentOS6.4

I did sudo mv /lib64 /backup_lib64 to test some compilation. Now sudo doesn't work at all farhat@heracles:~/software/sudo-1.8.7$ sudo ls sudo: unable to dlopen /usr/libexec/sudoers.so: (null) ...
0
votes
2answers
2k views

Why can I only run 'sudo node' and not just 'node'?

I just got a new macbook and installed node.js using the official installer. For some reason I can only run node.js using sudo node and not just node. I double checked the $PATH and the path to node ...
4
votes
1answer
479 views

sudo -k vs. sudo -K

I know what the man page has to say about the -K and -k : ‑K The ‑K (sure kill) option is like ‑k except that it removes the user's cached credentials entirely and may not be used in ...
0
votes
1answer
1k views

How can I list all users who can su into a generic account

I have a generic account several users can su into, I however would like to find the name of all users who can do this. Thanks, Oscar
0
votes
2answers
60 views

OS 10 - How to keep my account superuser?

I'm not using root on my macbook, so almost every time I will get some permission error which reminds me of adding 'sudo'. But it's so awkward. Is there any way to get around this issue? Can I make my ...
0
votes
1answer
171 views

Sudo password not required? OS X 10.8 (Mountain Lion)

I recently upgraded to a Macbook Pro Retina running OS X 10.8.3. I was going through the process of installing various command line tools when I noticed that it wasn't asking for my root password when ...
1
vote
1answer
5k views

Why there is no sudoers file: “/etc/sudoers: No such file or directory”?

I am trying to add a new admin user, but: # adduser username admin adduser: The user `username' does not exist. # man sudoers No manual entry for sudoers # less /etc/sudoers /etc/sudoers: No ...
0
votes
0answers
87 views

How to edit a remote file with implicit su-ing to another user on remote host

I want to edit files on Unix/Linux servers from my PC (running Linux and/or Windows). However due to security, I cannot log into the remote server as the file owner, but as my named user, then sudo su ...
0
votes
1answer
537 views

bash can't find sudo command on friendlyarm

I'm trying to work with this friendlyarm 9 board I got recently but it can't find some basic bash commands and I couldn't find a solution for it anywhere. When I type any command with sudo or even ...