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

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
162 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
3k 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
76 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
398 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 ...
1
vote
1answer
91 views

Download interrupted on Terminal - cannot reinstall

I was downloading the icedtea-7-plugin package for Ubuntu on the Terminal. I used the sudo apt-get install icedtea-7-plugin just like any other person would and I turned back to what I was doing, for ...
5
votes
2answers
175 views

How do I prevent all console access except via key-authenticated SSH?

I have a server environment for which the only methods of login would be SSH or local terminal in the datacenter. I have set this up to allow a specific user to login only with a key, not password ...
0
votes
2answers
96 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
1answer
141 views

Avoiding accidental 'rm' disasters

Today, using sudo -s, I wanted to rm -R ./lib/, but I actually rm -R /lib/. I had to reinstall my OS (Mint 15) and re-download and re-configure all my packages. Not fun. How can I avoid similar ...
0
votes
2answers
72 views

Sudo and perform scp

Possible duplicate of scp to remote server with sudo I'm facing the following issue: A folder (with sub-folders) with files belonging to usr1:usr1 I login with another user usr2 usr2 can do sudo -u ...
0
votes
1answer
2k views

How to enable sudo commands over SSH without asking password?

I have server A and server B (both Ubuntu 10.04 LTS) doing different tasks. Server A needs to poke Server B, which generates a file and scp's it back to server A when done. This is all in-house and I ...
2
votes
4answers
2k views

Is it possible to run software as a different user under OS X Mountain Lion?

I've been trying to run apps as a different user. Attempt 1 sudo -u otheruser open /Applications/TextEdit.app launches the app but it uses the current user, not otheruser. Attempt 2 login username ...
0
votes
1answer
77 views

Why sudo su don't pass as root, but password is ok?

In Ubuntu I have one normal user root1. And till now when I want to be a root I do: root1@host:/home/root1$ sudo su [ sudo ] password for roo1: type password and I had: root@host:/root:# but now ...
0
votes
1answer
223 views

How can I automatically save a list of open files in Geany, with cron or otherwise?

I use the Geany IDE for programming, and it does not reliably reload my previously open files, for example after a power outage. I found that Geany has a command line feature which returns a list of ...
0
votes
0answers
97 views

autologin to root user with .cshrc

How do we cause login cshell to automatically execute sudo su - when a user first ssh into the linux box from Windows putty ? We tried putting this line sudo su - in .cshrc file but it is never ...
2
votes
1answer
120 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 ...
0
votes
1answer
892 views

Shutdown Debian from php script

I am trying to shutdown my RaspberryPi running Raspbian from a php script running on lighttpd webserver. shell_exec("sudo /sbin/shutdown -h now 2>&1"); I added lighttpd ALL=(ALL) NOPASSWD: ...
23
votes
3answers
1k views

Sudo su vs su linux

If I enter in the password to su when prompted, it doesnt work while sudo su does. Also, when a command is executed using sudo (command), does sudo automatically execute it by root by default (since ...
1
vote
2answers
716 views

Trying to enable passwordless sudo

I want to enable passwordless sudo for user "bamboo" on my host, so I have added bamboo ALL=NOPASSWD: ALL and also %admin ALL=(ALL) NOPASSWD: ALL (user bamboo is in the admin group) to the ...
1
vote
3answers
862 views

Unable to use sudo su - command

I am new in ubuntu, i am trying to run following command sudo su - Bu i am getting following message sudo: unable to open /etc/sudoers: Permission denied sudo: no valid sudoers sources found, ...
4
votes
1answer
689 views

Why does redirection fail when passing through ssh, sudo and sh?

After reading this question, I know that I have to do sudo sh -c 'ls -hal /root/ > /root/test.out' to avoid the "Permission denied" error. But when I do ssh hostname sudo sh -c 'ls -hal /root/ ...
0
votes
1answer
403 views

how to run a program with root privilege in a remote linux host

I want to run a program on many remote hosts these program may run serveral hours and it needs root privilege I have uploaded the program to those remote hosts I can only ssh into those machines ...
0
votes
3answers
93 views

What types of users can I use with “sudo”?

I thought you could only use sudo to temporarily become root: sudo vim /etc/resolv.conf But recently I saw a shell snippet depicting a user using sudo to become a specific user: sudo -H -u devops ...
1
vote
1answer
557 views

how to correct sudo permission

I'm running AWS EC2 Micro instance and had issues getting permission to the root access with EC2-user. Followed a tutorial online and ran the following commands: sudo chgrp ec2-user /etc sudo chmod ...
0
votes
2answers
299 views

run command with root privileges as nonroot user

I want to set up steam to run automatically with a higher than default priority, which involves starting it with nice. But to set a priority lower than 0, I must be root. Problem is that steam doesn't ...
0
votes
1answer
237 views

How to config sudoers file?

I'm using ubuntu server 12.04 LTS I want to know how to configure my sudoers file (obviously, using visudo), to permit an user to run commands like root (doing something like "sudo service x ...
1
vote
2answers
179 views

wget: different speed in sudo and user mode

If I execute wget from my terminal to download something, it realices multiple attempts to download it, and eventually it downloads it (or not!). For example, with three attempts and 10 seconds of ...
2
votes
3answers
328 views

Mail me when someone runs sudo

I have added the below lines to /etc/sudoers.d/my_sudoers Defaults mail_always Defaults mailto="email@domain.com" I get an email every time sudo is run How can i modify this so I only ...
0
votes
1answer
106 views

Enable a user to have superuser privelages locally but with password input

Is there a way to have user privelages that would normally require superuser privelages, WITHOUT USING THE TERMINAL? I'm thinking like a dialogue that pops up when your trying to access a folder/file ...
2
votes
1answer
2k views

Add a user to sudoers file, for just one service

I want to add a user to the sudoers file so that it can only start, stop and restart a particular service. I am using Debian and can access the sudoers file using sudo visudo, I am stumped now though ...
0
votes
1answer
412 views

Prevent SUDO from executing passwd

I want to prevent users with sudoer access from using sudo to execute passwd (and thus changing the root password). Is this possible? If so, how can it be accomplished?
0
votes
1answer
84 views

Gentoo : cannot modify the hostname file as a sudoer

I am trying to change the hostname of a Gentoo host using a sudoer account. I use the following procedure : sudo rm -f /etc/conf.d/hostname sudo touch /etc/conf.d/hostname sudo echo "hostname=foo" ...
2
votes
2answers
3k views

Changed the permissions on /usr/bin

I executed sudo chown -R USER /usr/bin Now, when I try to "sudo" anything, I get sudo: effective uid is not 0, is sudo installed setuid root? I tried pkexec chown root:root /usr/bin/sudo and ...
1
vote
2answers
4k views

sudo to run command as different user

I am trying to setup a script that will be run as a "maint" user. The script is basically a menu that allows maintenance personnel to do different things on the server. However, some of the scripts ...
0
votes
3answers
140 views

Is Windows vulnerable because its sudo equivalent does not require a password? [closed]

On Windows from Vista and onwards, you have to press through an UAC dialog to perform something that requires admin rights like installing or uninstalling programs. On Linux to become root, you have ...
2
votes
0answers
155 views

Forklift sftp with sudo command?

Is it possible to somehow issue a sudo command while using Forklift to transfer files?
0
votes
1answer
62 views

All the command line command become “Not found” after installing Mountain lion

I just found after installing new Mountain lion, I can no longer use the command line because all the command seems to be " NOT Found", even for basic "sudo" command sudo: command not found How can ...
3
votes
1answer
832 views

How to add CLASSPATH parameters permanently when using sudo?

On Ubuntu 12.04.2 LTS 64bits, when using sudo or sudo -i or sudo su or even su in a session, in order to use both Java AND Scala I need to enter the following commands: sudo -i ...
1
vote
2answers
476 views

Function defined in my user's .bashrc causes an error when I sudo su

I have a function defined in my user's .bashrc file that displays my current git branch name at my command prompt: parse_git_branch() { git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* ...
1
vote
1answer
291 views

launching php script as root from command line

How can I execute php script as root user? I tried: sudo ./script.php and in my script I've got at 1 line: #!/usr/bin/php
5
votes
1answer
403 views

Two password (factor) authentication to root user / sudo

With regards to running Linux remotely (SSH) I'd like to employ two levels of authentication for accessing the system with root privileges. I have the root account disabled / locked out so direct ...
0
votes
2answers
171 views

i want alice to run any command as root, but can not run commands as any other user

Say I have 2 users - 'alice' and 'bob' and want to allow 'alice' to run any command as root, but not run commands as 'bob' or any other user, am I able to do this, and if so how ? consider this ...
-1
votes
2answers
147 views

I can su to root, but sudo <command> fails

I am running Centos 5.3 and I can su to root fine. However when I run a command as another user like: sudo ls, the system says incorrect password for the same password. Why is this happening? Thanks. ...
1
vote
3answers
613 views

Why can I kill a sudo process on Xubuntu but not Linux Mint? (as a normal user)

I have two computers, one running Xubuntu 12.04, and the other running Linux Mint 14. On Xubuntu: $ sudo gedit in another terminal: $ kill [pid of the gedit process] bash: kill: ([pid]) - ...
1
vote
1answer
952 views

Edit sudoers to allow /sbin/ifconfig down with NOPASSWD

I'm trying to edit /etc/sudoers so that I can execute a bash script with a root password. so far every edit I've tried to sudoers is not working. I've tried adding each of these lines: %admin ...
0
votes
1answer
344 views

Expect and sudo timeout

I have a main shell script that prompts the user for his password. I then would like to call an expect script while passing the password to it. This expect script will run 3 sudo commands. I know the ...
4
votes
2answers
427 views

How do I back out of sudo privileges in OS X

Is there a command to de-elevate the user from sudo permissions after I execute a command such as sudo pmset sleep 0 so that when I try to execute another sudo command it asks for my password again? ...
2
votes
2answers
126 views

restore password in ubuntu [duplicate]

I'm learning UBUNTU. I'm using virtual box with ubuntu image, i created my user name as joe no password. now that i try to execute any command that requires the sudo stuff it asks me for a ...
2
votes
1answer
478 views

Can't use sudo's arguments as non-root in Fedora 16

I am using a long-installed Fedora 16 box, and whenever I type "sudo -v", "sudo -l", etc. as a regular user (non-root), I get this output: [user@* ~]$ sudo -v env: -v: No such file or directory ...
0
votes
2answers
699 views

running script containing sudo in cron

#!/bin/bash value=$(<man.txt) echo "$value" if [ "$value" == "true" ]; then echo "startedif_manthan" ps -ef|grep sym |awk '{ print $2 }'|sudo xargs kill -9; sleep 30; sudo sh ...