Tagged Questions

Sudo Command The sudo command is a program for some Unix and Unix-like operating systems that allow a user to execute programs with the security privileges of another user. Typically those of a superuser or the root user. Through a configuration file, usually known as a sudoers file, an ...

learn more… | top users | synonyms

0
votes
2answers
47 views

sudo make install: permission denied

I have a most annoying question about building from sources. I've searched for an answer for a long while and nowhere can I find one... I've compiled software from sources before and this just baffled ...
7
votes
5answers
349 views

Why does “sudo -u root echo `whoami`” not return root?

How do you use sudo to run a command as the actual root user on Ubuntu? I originally thought this was the default behavior of sudo, until I ran: myuser@localhost:~$ sudo echo `whoami` myuser ...
1
vote
3answers
52 views

Sudo segmentation fault in Terminal [closed]

Possible Duplicate: Cannot do sudo: “/etc/sudoers is mode 0740, should be 0440” sudo: /etc/sudoers is mode 0640, should be 0440 Segmentation fault Any time I am trying to do ...
2
votes
1answer
51 views

Recording user activity if they have “sudo bash” access

I would like to monitor all the commands when a user calls sudo bash, including the rest of the commands.
0
votes
1answer
49 views

sudo makes me “lose” permissions when running a script?

I have a script that I need to run. It is kicking off a java program. When I run it as me, it seems to work fine. If I type "sudo myscript.sh" it does not run fine. In reality, I need to run it as ...
0
votes
1answer
59 views

Sudo with scp - transfering local file to remote server using ssh

So I'm running the following command scp \desktop\myfolder\deployments\myfile.txt user@host:/path/to/whereyouwant/thefile In an attempt to transfer a file from my local windows 7 machine to a ...
0
votes
1answer
70 views

passwordless sudo apachectl

I'd like to be able to restart apache under OS X Lion without entering a password. I tried placing this in /etc/sudoers: <User> ALL= NOPASSWD: /usr/sbin/apachectl But when I execute apachectl ...
0
votes
1answer
94 views

How to restore sudo privilege with Linux live CD?

I'm running Linux Mint 11 and I lost the privilege to use sudo, apparently the result of accidentally removing myself from the admin group. When I use the groups command to list the groups I'm in, it ...
1
vote
1answer
71 views

How to get the env vars I want with the superuser command?

I'm running OpenSuse 12.1 KDE. I was previously running Ubuntu. In Ubuntu there was a superuser option (sudo -s) that preserved the original user's HOME env var (and another option, sudo -i, that set ...
1
vote
1answer
43 views

How do I create a command to run with sudo?

I have created a file called svrestart in /home/gab/bin (which is a folder that should be automatically be added to path on startup) which contains: /etc/init.d/nginx restart /etc/init.d/php5-fpm ...
1
vote
2answers
39 views

custom sudo command

How can I make custom functions accessible to the sudo command? I have my Mac OS X set up with Bootcamp, but also with VirtualBox so I can run Windows for testing websites in IE. I have to run this ...
0
votes
1answer
62 views

“You are not in the sudoers file” error after running sudo command

I tried using a sudo command on my iMac to create a bootable version of Ubuntu, but when I run the command by pressing enter, I got the warning that the command might screw up my system, which I ...
1
vote
3answers
302 views

bash: sudo: command not found on OS X Lion

This baffles me. sudo [any command here ] bash: sudo: command not found Eek! I tried to uninstall the Ruby Version Manager (it wouldn't compile Ruby for some reason). Somewhere in following their ...
1
vote
3answers
83 views

Why does vi and sudo vi give me different version of vim?

The default version of vi that comes with Ubuntu Hardy is the 7.1 or 7.2. So I installed vim 7.3 from sources. Then to make it convenient I added this to my .bashrc alias vi='vim' In order to let ...
0
votes
2answers
33 views

Ubuntu 11 Desktop without an administrator user

Somehow I managed to change my user to a "standard" account, as opposed to an administrator account, and I don't have any access to sudo, or a backdoor account with admin rights. Is there anyway I ...
0
votes
1answer
67 views

sudo does not preserve PYTHONPATH

I modified /etc/sudoers (using visudo) to keep environment variables : Defaults !env_reset # Host alias specification # User alias specification # Cmnd alias specification # User privilege ...
0
votes
0answers
68 views

Postfix/Sendmail not working with sudo

If I understand correctly, when a user not in sudoers uses sudo, an email is sent out to root. Without any sort of mail program installed on my Arch machine, this wasn't doing anything, however. So ...
1
vote
2answers
125 views

Remote sudo edit in Vim

How can I edit a remote file with sudo? I have ssh/scp access to remote server, and passwordless sudo on it. I want to edit /etc/some/file as remote root, so I ran: $ Vi ...
2
votes
1answer
135 views

Sudo can't resolve hostname

$ curl http://google.de # DNS resolution works fine ... $ sudo curl http://google.de curl: (6) Couldn't resolve host 'google.de' $ echo $http_proxy http://proxy:8080 $ cat /etc/hosts 127.0.0.1 ...
2
votes
1answer
84 views

Can I have sudoedit check `$EDITOR` like visudo does?

As far as I know, the major difference is that visudo has a simple parser for seeing if /etc/sudoers (and other sudoers files) is goodly; however, I also noticed that, when I set EDITOR=emacs, ...
0
votes
1answer
61 views

Whats wrong with this entry in the /etc/sudoers file?

I am trying to let user2 run a particular script - script.sh that belongs to user1 and allow him(user2) to run as the script's owner, user1. So I made an entry in the /etc/sudoers file, however visudo ...
0
votes
1answer
140 views

What do the “ALL”s in the line “ %admin ALL=(ALL) ALL ” in Ubuntu's /etc/sudoers file stand for?

What does each ALL mean? I understand that the whole line indicates that the admin group members get admininstartive privileges, but would like to know more info about the position of the ALLS and if ...
0
votes
0answers
68 views

Controlling Upstart job as unprivileged user

What's the best way to allow an unprivileged user to control an upstart job? By controlling an upstart job I mean starting/stopping/reloading/restarting it: start myservice I can imagine one way ...
0
votes
1answer
33 views

Can I tell if Root / Sudo has been used/accessed

Would it be possible to check if the root user (or sudo) has been accessed on my server. I ask this because I am creating a server monitoring tool and I wanted to know if there was a way to check ...
0
votes
0answers
67 views

Trouble implementing ssh-agent forwarding across ssh and then su

I've got a web server with a dedicated unprivileged user who runs the apache instance on the box. The php code for the app the web server runs is in a private github repo that I occasionally need to ...
2
votes
1answer
129 views

How do I run bash scripts as root over SSH?

I have a number of centralized scripts, which install certain pieces of middleware (for example JBoss-AS, JBoss-EWS, etc). The idea is to use expect to write a script which runs the script (which can ...
1
vote
1answer
80 views

Is there a good way to give ec2-user admin credentials on EC2? I'm sudoing too often

Disclaimer: I'm only decent with EC2 and Unix commands / Linux administration. Question: How do you give ec2-user the same permissions as root? I'm tired of sudoing. Why? I found out that you have ...
0
votes
3answers
99 views

Understanding Linux symlinks

I have two directories on a virtual machine. One of them is my home/user directory, the other is the /var/www/html folder which renders the public website. Every time I upload files for my web app ...
0
votes
2answers
526 views

“no valid sudoers sources found, quitting” error while chmodding /var/www

I'm new to Ubuntu and just installed LAMP. I'm trying to paste files into the /var/www/ directory so i can test my PHP projects, but I can't. I have searched on the web and all I read is: "type sudo ...
0
votes
1answer
38 views

Disabling need for sudo password for a single command

I would like to force the user to authenticate with his password, everytime he issues a command with "sudo". However, there is one command (an init script) that I want to exclude from that need. This ...
1
vote
2answers
59 views

Get the user's home when sudo-ing in a script ran by root

In the manpage of sudo I found the -H option, but I don't seem to understand how it works. The manpage says: The -H ( HOME ) option sets the HOME environment variable to the homedir of the ...
2
votes
1answer
101 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 ...
0
votes
0answers
28 views

OS X: install command line application from GUI application

Our Java-based GUI application should upon user-request install a command line tool, e.g., by adding a symlink to a directory where normal users can't create files. Hence we need to invoke a ...
2
votes
1answer
101 views

How to put commands in a bash file that normally require shell login?

First of all, I'm totally new in this Linux world. So, please consider this when you read. I got a 10 to 20 lines of bash code which I need to run periodically. Now yesterday, I've been trying to put ...
0
votes
1answer
56 views

How can I allow user A to run commands as user B if I don't have access to root?

CentOS 5.6 There are two users; user A and user B. I have permissions for both and can log in as either. I would like to be able to log in as user B, and somehow run commands as user A without ...
0
votes
0answers
22 views

How to give permission to applications in order to make changes on mounted partition

I use dual operating systems: Ubuntu and Windows 7. I want to share on both Ubuntu and Windows only one Dropbox folder. Whenever my computer starts, It mounts automatically an ntfs partition which ...
3
votes
2answers
609 views

Matlab Installation in Ubuntu

When I try to install Matlab 2011a, I get an error like this. /tmp/mathworks_3203/java/jre/glnxa64/jre/bin/java: Permission denied I searched internet, but what I found is to become root. I ...
1
vote
1answer
193 views

How do I run a SVN post-commit script as root?

I have a SVN repository server that runs under the repository user, and I want to run a script after every post-commit action. I therefore wrote a shell script that runs from the hook after every ...
0
votes
2answers
502 views

How to execute a command with admin privileges and access to files of the logged in user?

I have some problems understanding sudo. I am logged in on a terminal as an non-admin/non-root user. This "normal" user is not in the sudoers file (and shouldnt be, in my opinion). Now I try to ...
2
votes
2answers
100 views

Screen does not appear in list when using sudo

While under root user (printed by whoami), execution of sh -c "screen -d -m -S testscreen sh -c \"echo asd; echo qwe\"" creates a screen with two lines output, which can be reattached via screen -r ...
2
votes
1answer
718 views

SSH - dpkg: command not found?

I'm running Ubuntu and trying to install Ajax Push Engine: This is everything I do since opening the terminal to getting the error: lisandrov@lisandrov-Satellite-L655:~/Desktop$ ssh ...
1
vote
2answers
51 views

Best way to store root passwords

I have over ten web servers to manage and configure, with each server having its own root user and password. I have to maintain a database of all the root passwords on my development machine, but I ...
0
votes
1answer
163 views

Ubuntu, apache - sudoers problem

I need to execute a script via php (php5.xx), server running apache2 (Ubuntu 10.04). The script needs to be executed as another user. I added following lines to /etc/sudoers file: Cmnd_Alias ...
1
vote
1answer
30 views

Get Windows To Remember Recent Admin Auth?

Ubuntu remembers one has recently authorized admin access (Sudo and Gksu at least) to avoid the need to repeatedly auth. Is this possible in Windows?
1
vote
2answers
133 views

Sudo and Bash Script

If I call a bash script with sudo, for example: sudo bash script.sh Do I still have to use sudo inside the script in cases like this: sudo apt-get update
0
votes
0answers
57 views

How can I make it easier to move files from an underprivileged (user) account to a root directory in linux?

I'm sure it's been asked and answered many times, but I can't seem to find an answer. Maybe this question will link someone else to the right answer. Here's the problem: ~$ sudo ls ls: ...
1
vote
2answers
61 views

How to remove all privileges from a particular user

I need to create a user in Fedora Linux(15) which only has privileges to print documents. Our college issues a printer to each lab and I need to create a new user on my Fedora which only has ...
1
vote
2answers
177 views

Permissions: Why do I always have to type 'sudo' before every command?

I'm editing theme files in a wordpress site owned by www-data:www-data as my main user 'oma'. Every time I create a file or edit one, I have to use the sudo command and it gets created as root:root. ...
1
vote
2answers
49 views

sudo not giving full access on Mac OS X

I am trying to install npm via shell script on mac 10.6.4 and sudo does not seem to be working as the shell fails when trying to access /usr/lib and create documents in that directory. What is wrong? ...
5
votes
1answer
42 views

Who are forbidden sudo requests reported to?

When I am forbidden to run sudo I get the following message: barack.obama is not in the sudoers file. This incident will be reported. But who is it reported to, and how?

1 2 3 4