0
votes
1answer
39 views

Permission denied on sudo remove

I have two users userA and userB. userA has permission over a file named cache. I want to give permission to userB to remove the file. I have made following entry in /etc/sudoers file : userB ...
0
votes
1answer
31 views

Run startup script with another user

I have two users user1 and user2. And tomcat has owenership of user1 and started with user1 only. I need to make a rule for user2 such that user2 can starts/stop tomcat but tomcat should always be ...
0
votes
1answer
33 views

Sudo Cmnd_Alias Optional Arguments

I would like to allow a command to be run under sudo with or without arguements. For example, both of these should work: rm -f /etc/stuff rm /etc/stuff/item.txt To get this to work, I need this ...
3
votes
1answer
177 views

'user is not in the sudoers file' but actually is

I have already read a lot of posts about enabling sudo-access for a specific user but those couldn't help me so far. The situation is: I'm running Debian Testing. On the system there are only two ...
0
votes
0answers
60 views

/etc/inittab combined with su - newuser failed to bringup new process with different UID than root

Using /etc/inittab on RHEL 6.3 x86_64 system, we tried to respawn a binary: aka watchdog from newuser UID login when restarted, not as a root UID process. Made the following changes as inline. ...
0
votes
0answers
25 views

program needs to be run as root by any user and can be located anywhere

I have some program called foo that needs root privileges when it executes. foo needs to be able to be run by any user and can be located at any path. The reason this program can be at any path is ...
0
votes
2answers
35 views

remove specifying the full path in sudoers

I am trying to add a NOPASSWD entry for 'sudotest.sh' (or any script/binary that requires sudo) in my /etc/sudoers file (redhat) but in order to make it work, I must specify the full path. The ...
4
votes
1answer
58 views

Passwordless sudo works for one user, but not for another

I struggle to create passwordless sudo for one user on my Debian server. I've added the following line to the sudoers file: deployer ALL = NOPASSWD: ALL but it doesn't work. To my surprise, I can ...
1
vote
1answer
621 views

Broken sudo on amazon web services ec2 linux centOS

So I had no idea of the dangers of messing with the /etc/sudoers file, and was just trying to make a simple change in there. However, I seem to have put something with incorrect syntax in there, ...
10
votes
1answer
9k views

sorry, you must have a tty to run sudo

I had already asked this question in Stack Overflow, but I've been asked to post it here. So doing the same. I ran this command using my java program- sudo -u <username> -S pwd I got this ...
1
vote
1answer
87 views

Let a user to run a command as a member of a group he does not belong to, using `sudoers`

How can I let a user U to run a command /usr/bin/C as a member of a group G (while he does not belong to the group G), using sudoers on Debian Wheezy?
0
votes
1answer
236 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
1answer
947 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
2answers
65 views

How can I run commands like setfsuid, setfsgid as a normal user?

Normally only the root user has permission to run these commands. Is any way I can run these as a normal user?
1
vote
1answer
84 views

How to allow only 2 groups to use network commands using sudoers

How could I change the sudoers files in order to get both "networkadmingroup" (a group created by me) and the "admin" to use all the network-related commands but not the rest? This is my attempt: ...
10
votes
3answers
2k views

How can I properly set sudo/visudo's editor?

I am using Ubuntu 10.04 Server and trying to set up sudoers to respect a user's EDITOR choice (within limits) In my sudoers I have: Defaults editor=/usr/bin/nano:/usr/bin/vim Defaults ...
3
votes
2answers
218 views

Force sudo to ask for password once from outside sudoers

I'm trying to hack together my own Android app that opens an SSH connection to my computer, and sends commands. I am aiming to keep the interactivity of this process to a minimum, to make it have the ...
2
votes
4answers
3k views

Linux mint Sudoers edit not working - cant do anything

I am running linux mint. I setup an administrator account called 'thomas' I am trying to edit some files and it will only let me open them as read only - I assumed a permissions problem. As such i ...
2
votes
1answer
308 views

Start SSH Server without typing a password - Sudoers (NOPASSWD)

I would like to execute the below command line without typing a password sudo -s /bin/launchctl load -w /System/Library/LaunchDaemons/ssh.plist So I tried to add the below lines to my sudoers but ...
1
vote
1answer
208 views

Automation of restarting the network without root permissions/password

I'm an avid torrenter, and since I'm busy must of the day, having Transmission-GTK run at night is my best option. However, my college server loves to kick people out after either an extended time ...
3
votes
2answers
602 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
261 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 ...
3
votes
1answer
7k 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 ...
3
votes
1answer
374 views

User supposedly not in sudoers file, but already is!

I'm running Ubuntu Server 11.04. It came time to add User to the sudoers file: so I decided to simple add User to the admin group: usermod -a -G admin user Then I used visudo to check if admin users ...
0
votes
3answers
1k views

Switching users in a bash script

I want to execute a bash script that switches user and then executes a series of commands. None of this users have root privileges. I guess I have to edit the sudoers file to give user1 (the user ...
3
votes
6answers
2k views

a safer no password sudo?

Ok, here's my problem - Please don't yell at me for being insecure! :) This is on my host machine. I'm the only one using it so it's fairly safe, but I have a very complex password that is hard to ...
5
votes
1answer
1k views

What are the percentage signs for in the sudoers file?

In my sudoers file, there are lines that begin with #, lines that begin with % and lines that begin with neither. The # is definitely being used to comment out lines, but what does the % do? Is it a ...