Questions tagged [sudo]

The sudo command is a program for Unix and Unix-like computer operating systems that allows a user to run programs with the security privileges of another user (normally the superuser, or root). The name is an abbreviation for "substitute user do" (as in, do a command as if started by another user).

The sudo command is a program for Unix and Unix-like computer operating systems that allows a user to run programs with the security privileges of another user (normally the superuser, or root). The name is an abbreviation for "substitute user do" (as in, do a command as if started by another user).

Unlike the su command, users typically supply their own password to sudo rather than the root password. After authentication, and if the /etc/sudoers configuration file permits the user access, then the system will invoke the requested command.

2818 questions
1
vote
3 answers

How to deploy WordPress with Capistrano on shared host without sudo

In the pursuit of a more professional WordPress dev and deployment environment I am trying to use Capistrano to deploy from my local dev environment to staging and production servers but I can't quite get it to work. I am on Site5 shared hosting and…
Mischa Colley
  • 123
  • 3
  • 13
1
vote
2 answers

How can I make a Bash script that sudo's all by itself in OS X on a standard account, assuming I know the root password?

Okay, for reasons I won't get into (because they're rather silly), I need to make a shell script that will enable SSH on OS X every, say, 10 seconds. Yes, I know it sounds silly/pointless, but there is a reason. Just for clarification, I know the…
user1650369
1
vote
2 answers

run command as root via php

I have a php script which contains su. when I run it in shell it ask for root password and works well. but now I want make an interface for it. as you know all command in php-apache runs as www-data user and this user doesn't have specified password…
Farhadix
  • 1,395
  • 2
  • 12
  • 25
1
vote
2 answers

to append text to "/root/.profile"

I want to append some text to a privileged file /root/.profile. I used following scripts to do so. sudo echo "blabla" >> /root/.profile it still complains with permission denied. What is the right way to do so? I am using bash4 on ubuntu12.04
Richard
  • 14,642
  • 18
  • 56
  • 77
1
vote
4 answers

Most pythonic way of running a single command with sudo rights

I have a python script which is performing some nagios configuration. The script is running as a user which has full sudo rights (the user can run any command with sudo, without password prompt). The final step in the configuration is…
blueFast
  • 41,341
  • 63
  • 198
  • 344
1
vote
1 answer

rsync proxy not working even though RSYNC_PROXY set

I'm behind a http proxy and a wanna update macports using sudo port selfupdate. But it always fails with the following output: $ sudo port -d selfupdate DEBUG: Copying /Users/simon/Library/Preferences/com.apple.dt.Xcode.plist to…
S. Liu
  • 1,018
  • 2
  • 10
  • 25
1
vote
2 answers

php to call a shell script

purpose: use php to input commands directly into the minecraft server console Im trying to use a php script (run from browser) to exec() a shell script. when i run the php from a terminal it works! But in the browser, nothing happens. exec('sudo -u…
ProjectPaatt
  • 15
  • 2
  • 8
1
vote
1 answer

python subprocess as normal user

I have a script that needs to be run as a super user: $ sudo ./python-script.py Within this script, I do some other things that do not require super user privileges. $ os.mkdir('somefolder') What is the best/most efficient way of creating the…
jshawl
  • 3,315
  • 2
  • 22
  • 34
1
vote
1 answer

Gnome, show authentication dialog

I am writing a GUI application using Qt. I am I want to use super-user/root privileges to run a terminal command inside my GUI application. My application is not started as super-user/root. Using gksu on Ubuntu and kdesu on KDE-based distributions,…
Ivan Caravanio
  • 597
  • 1
  • 7
  • 20
1
vote
3 answers

JSch: sudo sometimes not working

I have three machines and I need to ssh to them one by one, and then sudo a command. I need the JSch to do the following things: ssh @ sudo This is the code block how I use to run JSch: String homeFolder =…
Vic Lau
  • 173
  • 2
  • 8
1
vote
1 answer

Executing a shell script that requires sudo from a web app

Given that the web application doesn't have su privileges, I'd like to execute a shell script that requires sudo. I'd also like to avoid having the user input the password. What are my options? This is basically what I'm trying to do. Wicket…
Kevin D.
  • 1,500
  • 1
  • 18
  • 41
1
vote
1 answer

Eclipse-CDT: How do I handle permission denied errors opening sockets?

My program opens a socket on port 80, but if I don't run it as root (with sudo) then it fails to open the socket with a permission error. This means my application doesn't work when I launch it in the debugger. So: Can I tell Eclipse-CDT somehow to…
waterlooalex
  • 13,642
  • 16
  • 78
  • 99
1
vote
1 answer

PHP: List root's crontab with sudo

Using PHP I would like to be able to list root's crontab. I am able to run the following command as the Apache user from the command line and get the desired result: sudo crontab -l however, in my PHP I have the following command which does not…
G2B
  • 27
  • 5
1
vote
2 answers

Run a particular process without using sudo

I understand my question is not that clear so let me try explaining it here. What I am trying to do is suspend my computer after completing a certain task. My script: #my logic or task(Downloading a file)# cmd = shlex.split("sudo pm-suspend") >>>…
RanRag
  • 48,359
  • 38
  • 114
  • 167
1
vote
3 answers

sudo using PATH ahead of fully qualified executable

I ran into a problem that I've never seen before and can't exactly explain. I was helping someone run a perl based install on a RedHad 4.6 zLinux and running under sudo seemed to grab the system perl rather than the fully qualified perl…
Tim