0
votes
1answer
17 views

Disable NOPASSWD sudo access for ubuntu user on an EC2 instance

How can I disable the passwordless sudo access for the default ubuntu user on an EC2 instance? Is it safe to do it?
13
votes
3answers
482 views

Which method to use for granting sudo

What is the difference between adding a user to /etc/sudoers and usermod -a -G sudo? Which method should be used for granting sudo?
-1
votes
2answers
52 views

Sudo access on Ubuntu

I'm new to linux and the sysadmin world all together, so I'm looking for some advice and a couple of answers. I set up an EC2 instance running Ubuntu 12.04 and I SSH in via key pair. First of all, I ...
2
votes
2answers
76 views

Root user is not able to access

I had a ubuntu user which has root level privileges but I haven't created password for it, there are other user also on the machine but none of them have sudo permissions, unfortunately permissions on ...
2
votes
4answers
184 views

User with root privileges to restart a service can't

I want a user to be able to restart the php5-fpm service. In visudo, I have the following: username ALL=NOPASSWD: /etc/init.d/php5-fpm When I su to the user and run sudo /etc/init.d/php5-fpm stop, ...
4
votes
1answer
231 views

sudo fine, sudo ls not working (command not found)

On Ubuntu 13.04 running in EC2, all commands through sudo work fine except ls. Here are some example commands to illustrate the issue: ubuntu at host in ~ $ sudo ls sudo: command: command not found ...
3
votes
1answer
186 views

Adding group to sudoers has no effect

I'm trying to grant the www-data group access to certain commands under sudo (ie to restart Apache) and I'm having no luck. I spent the majority of Friday looking into this issue and must have looked ...
8
votes
4answers
1k views

`sudo echo “bla” >> /etc/sysctl.conf` permission denied

Disclaimer: I'm pretty novice at sysadmin stuff. I'm trying to set up port forwarding in an AWS EC2 instance, this has to be done in the command-line because I don't want to go in and edit anything, ...
-2
votes
1answer
54 views

sudo -u … -i doesn't preserve a user's PATH

I'm trying to determine a user's path when I'm root, but sudo, even with the -i flag, doesn't seem to replicate the user's environment correctly. Is this some sudoers policy setting? $ sudo bash # ...
1
vote
2answers
1k views

Best practices to avoid Jenkins error: sudo: no tty present and no askpass program specified

When running any sudo command from Jenkins I get the following error: sudo: no tty present and no askpass program specified I understand that I can solve this by adding a NOPASSWD entry to my ...
0
votes
1answer
177 views

How to avoid specifying full path in sudoers file?

I am trying to add a NOPASSWD entry for sudotest.sh (or any script/binary that requires sudo) in my /etc/sudoers file (on Ubuntu 12.04 LTS server), but in order to make it work, I must specify the ...
2
votes
1answer
156 views

“sudo: no tty present” for munin plugin using password-less sudo

I am writing a plugin for munin to monitor something on our Ubuntu Linux server (which is on Amazon EC2). The plugin requires running a programme /usr/sbin/rabbitmqctl via sudo. I have the following ...
0
votes
1answer
102 views

sudo -u fails with env: -u: No such file or directory

On Ubuntu 12.04, when I do sudo -u <user> ls I get env: -u: No such file or directory This happens for any command and any user for <user>, including myself and root. Any ideas how ...
0
votes
1answer
148 views

Recommendations for bootstrapping Ubuntu server

When I create new Ubuntu 12.10 instances, I typically bootstrap them by manually SSHing onto the machine and editing the sudoers to put a NOPASSWD on the default user (e.g., ec2-user, azureuser, ...
0
votes
2answers
138 views

Advice regarding SUID and sudo on Ubuntu Server

Just wanting a bit of advice. I have root access to a server and I want to create a second user and execute everything via sudo should I need to rather than logging in as root. The file /etc/sudoers ...
4
votes
1answer
251 views

How can I use etckeeper via sudo with different users and have the correct user in the commit message? [duplicate]

I'm working on a server with several admin users. Each of them can use sudo to make configuration changes. We're keepeing our /etc directory version-controlled using etckeeper. However, when I or ...
0
votes
1answer
216 views

“Target the specific user you will be using and assign it user id 0/group 0”

I am trying to virtualize an Ubuntu machine using VMWare vCenter Converter, but ran into permissions issues. I followed the instructions of part 1 and 2 on this page but when I got to "For Ubuntu ...
0
votes
4answers
182 views

Need to use sudo with ssh

I'm trying to run the following comamnd as user flc: sudo hg clone git+ssh://git@github.com:flc/myproject.git /opt/flc/projects/myproject However, I'm getting this error: Permission denied ...
0
votes
1answer
145 views

File permission woes on an Ubuntu ec2 instance

I've set up an amazon ec2 instance and I'm have some file permission issues. I've created myself a new user and added myself to the following groups: adm:x:4:me,ubuntu sudo:x:27:me ...
0
votes
2answers
2k views

Problems opening Gedit using X11 in new Ubuntu installation

I've just installed Ubuntu 11.10 and created a new user (and added them to the sudo group). When I log in as the new user (not root) and try to open gedit I get the following error: ** ...
1
vote
1answer
319 views

Ubuntu Server Permission Problems

Our sysadmin quit and I have been handed "the ropes." Unfortunately, I don't know how to climb very well. Here is my problem. We have 4 servers that we use for our hosting of client's sites. ...
2
votes
0answers
608 views

Nginx doesn't seem to stop correctly

I'm using the following script to start/stop nginx: #! /bin/sh ### BEGIN INIT INFO # Provides: nginx # Required-Start: $all # Required-Stop: $all # Default-Start: 2 3 4 5 # ...
2
votes
2answers
265 views

sudo asks me for password [closed]

i edited /etc/sudoers using visudo command so as to grant user sudo privilege without password as following : userName ALL=(ALL:ALL) NOPASSWD:ALL but it didn't work for me , any suggestions ...
2
votes
2answers
494 views

Remotely use root over ssh for unison

I'm a little confused on how to run unison to sync files with group and owner attributes on an ubuntu system, as you need to be root. But I need to do this remotely and automated. I know I can set up ...
0
votes
3answers
2k views

sudoers file, allow running file as root [closed]

I need to be able to run the command /usr/bin/evrouter as root, without being requested a password. See ...
0
votes
2answers
129 views

Can I get mailman's newlist script to run without needing sudo?

I'm writing a PHP application and I want to be able to add new lists to mailman running on my ubuntu server. For one reason or another, mailman's newlist script requires root privileges. Is there any ...
-1
votes
1answer
547 views

Give a user permission to run sudo without password on some operators [closed]

I have a deploy user. I'm trying to make it to execute some operators without using sudo that i could enter a password for. here's my visudo: # /etc/sudoers # This file MUST be edited with the ...
2
votes
3answers
298 views

In Ubuntu, how can I give two groups of users root power except for access to one folder?

I just created a Ubuntu development server and I would like to work with two teams on it. I want people from these teams to do anything they want, but I don't want them to be able to see the files ...
2
votes
2answers
2k views

“unable to resolve host error” whenever running a command with SUDO on ubuntu webserver

I have a server on amazon which normally runs like a champ; after increasing the instance size this weekend, then decreasing it back down to its normal size, I've started to get odd errors every time ...
-2
votes
1answer
178 views

Su fails despite entering in the correct password

I just recently installed Ubuntu 11.04 on my desktop, and I only entered in one password during the install process. This password works to log into the machine, run updates etc. When I open up the ...
1
vote
2answers
271 views

error deploying app with Vlad, running a sudo command, to Ubuntu server

I'm a n00b when it comes to ssh, sudo and other unix things... so bear with me, here. i've got a rails website set up and deploying with vlad via ssh already. this works fine. now i need to have my ...
1
vote
1answer
731 views

Sudo ldap with FQDN instead of short hostname

At my workplace, we're using sudo-ldap to provide sudo privileges across the network from a centralised store. We do this based on the username plus the hostname they're running sudo on, e.g.: ...
4
votes
2answers
2k views

How to grant sudo rights only to specific script files?

I would like a user to have sudo rights (without password check) to a couple of shell scripts under a specific directory (in my case, /usr/local/tomcat7/bin), and to nowhere else. What's the simplest ...
0
votes
1answer
219 views

allow a user to run command as another user without any password prompt

I'm trying to achieve same result as the answer from that existing SF question without having to enter the password for the original user, that is, I'm userA, and I want to be able to run a command as ...
4
votes
1answer
82 views

When you use sudo, where does it log by default?

When you use sudo to perform root level operations, where does it log to by default on ubuntu? I don't see entries in syslog.
0
votes
1answer
248 views

Tried to install lamp-server on Ubuntu 10.10 (weird error)

Ran the following command from a user account listed with ALL permissions in visudo. sudo tasksel install lamp-server debconf: DbDriver "passwords" warning: could not open ...
0
votes
2answers
314 views

Why no first user setup as sudo on Linode (Ubuntu 10.10)

The standard setup for Ubuntu is to create two users, root and a first user. The first user always gets full sudo access and root login is disabled (for security). Linode doesn't do this, it just ...
3
votes
2answers
574 views

Key authentication not working when using ssh or rsync as sudo

I have ssh RSA key authentication setup between a client and an ubuntu server (following this procedure): -the RSA key authentication for ssh and rsync work fine (no need for password). -the RSA key ...
0
votes
3answers
160 views

What is the affect of executing “sudo passwd” on a system without a root account?

I've just used "sudo passwd" instead of "passwd" on a system by mistake and I'm wondering what the affect of this would be. There are two users on the system, my user account which has sudo privileges ...
6
votes
2answers
4k views

How does `sudo` search the path for executables?

I am using rubygems (1.3.7) with gems that require root privileges on Ubuntu 10.10. When I compare my setup to an ubuntu 9.10 with rubygems 1.3.6 installation, I see the following difference in gem ...
0
votes
1answer
1k views

Can't start Eclipse from command line in Ubuntu

If I double-click on the eclipse icon then Eclipse boots up, but for some reason when I navigate to the directory of Eclipse and run something like sudo bash eclipse I get the error that it can't ...
1
vote
1answer
548 views

Error using sudo

I recently started having this error when using the sudo command: sudo: /etc/sudoers is mode 0644, should be 0440 sudo: no valid sudoers sources found, quitting Any idea how to resolve this? I use ...
2
votes
3answers
198 views

How to enable non sudo user access to top with all processes?

I use Ubuntu Server 10.04. I have users that normally don't have access to sudo. When this user is using top command he sees only processes for the current user. I added a line to /etc/sudoers: user ...
6
votes
1answer
6k views

Repair a broken sudoers file [duplicate]

Possible Duplicate: Ubuntu : borked my sudoers file, how can I fix it? Problem description: I have broken my /etc/sudoers file by making a typo in it. Now I can no longer use any sudo ...
5
votes
3answers
189 views

Log sudoer & email reporting

I have a user on a Ubuntu system of mine who needs sudo access, but I don't trust him as much as I'd like to be able to. Is there a way to log all of his sudo activity, and email it to me at the end ...
3
votes
1answer
2k views

Only allow a user to CHMOD and CHOWN in their home directory or a specified directory

I have a Windows user on my network who has Samba access to our linux development server. Occasionally permissions or ownership will become confused for reasons unknown and he will no longer be able ...
4
votes
3answers
2k views

Sudo asks for password twice with LDAP authentication

I have Ubuntu 8.04 LTS machine and Windows 2003 AD domain. I have succesfully set up that I can log in with domain username and password, using domain prefix, like "domain+username". Upon login to ...
6
votes
4answers
4k views

Ubuntu : borked my sudoers file, how can I fix it?

I was editing my /etc/sudoers file and saved it but it has a syntax error in there. Now I can't 'sudo vim /etc/sudoers' because sudo thinks the sudoers file is not valid. How can I fix this?
1
vote
1answer
645 views

How to set a password via environment variables for a cifs mount in Ubuntu?

I've been trying to set the PASSWD environment variable like it says you can in the mount.cifs manual, but it still prompts me for a password and ignores the environment variable I set before it. ...
1
vote
4answers
2k views

Editing with Winscp

I would like to edit files in my /etc from winscp. I have administrator privileges on this computer, How can i edit files and save them from Winscp in folders that require sudo be written before any ...