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.
0
votes
0answers
24 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 ...
1
vote
2answers
29 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
19 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
0answers
28 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
17 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 ...
1
vote
1answer
32 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
53 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
936 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
43 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
66 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, ...
3
votes
1answer
45 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
44 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
51 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
50 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
67 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
56 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
113 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
42 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
57 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 ...
1
vote
1answer
49 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
26 views
Prevent SUDO from executing passwd
How can I prevent the users from executing passwd using sudo on Linux?
0
votes
1answer
19 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
111 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
131 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
88 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 ...
0
votes
0answers
28 views
Forklift sftp with sudo command?
Is it possible to somehow issue a sudo command while using Forklift to transfer files?
0
votes
1answer
21 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 ...
2
votes
1answer
104 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
73 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
35 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
107 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
99 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
55 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
172 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
106 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
69 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 ...
3
votes
2answers
84 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
52 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 ...
-3
votes
2answers
67 views
How can I setup a way to temporarily block my own access to my /etc/hosts file? [closed]
I'm interested in being able to temporarily prevent myself from editing my /etc/hosts file for the sake of productivity. When I am trying to get work done, I like to block access to the websites that ...
2
votes
1answer
135 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
75 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 ...
4
votes
1answer
100 views
Why does sudo not work with curl?
I ran a command to download something with curl and it threw a permission denied error. So I did sudo curl and I got the same error... Why is that?
I was able to run the install command without ...
1
vote
3answers
227 views
Why can't I sudo some commands? (e.g., vim)
I have sudo access on my friends server, running centos-6.3, but when I try to run some commands like sudo vim /var/www/html/index.html I get an error sudo: vim: command not found I can, however, run ...
1
vote
0answers
62 views
Start/stop a service using jenkins/hudson, without sudo
Quick question - did some searching but couldn't seem to find anything.
I'd like to be able to stop/start a service on a Jenkins node. Is it possible to give the jenkins user permission for this ...
0
votes
0answers
35 views
Why are ruby gems showing up in sudo gem list when I install using sudo
This has happened several times recently, but here's the one I am currently stumped on:
I want to install nokogiri under a local ruby installation. locally I run ruby 1.9.3, the sudo installation is ...
4
votes
1answer
91 views
sudo -E not passing all variables
Reading the man pages I expected sudo -E to pass all environment variables to the subshell, but I am not getting the expected results.
As expected, awesome:
$ export ...
0
votes
0answers
40 views
why sudo create directories in wrong permission drwxr-sr-x?
I run sudo on ArchLinux(on x86_64) and Fedora(on sh4 cpu). They behavior different.
sudo mkdir x
ls -l x
It shows drwxr-xr-x root root x on ArchLinux.
But shows drwxr-sr-x root mygroup x on Fedora ...
0
votes
1answer
47 views
Passing User's aliases to root while doing “sudo su”
Is it possible?
I could make an alias to sudo su -;source .bashrc but it seems like source .bashrc is executed in the earlier shell and not in root's sheel (Why?)
0
votes
3answers
310 views
Execute a command with root permissions as normal user
I want to execute a command as if I am my normal user, but I want to have root certain permissions. In particular, I have created a phyiscal VirtualBox drive that I want to use as a normal user.
I ...
1
vote
4answers
317 views
“Wrapper” ssh script freezes when executing remote command
I am running OSX Mountain Lion and the remote server is CentOS 6. I have several scripts on my local machine that I want to run on the remote server and to that end, I thought to write one script that ...

