The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
1answer
23 views

ubuntu superuser got corrupted

I was trying to save times to type password for sudo because one of my scripts had to be randomly repeated quite often. I googled some information about how to bypass typing password and applied to ...
0
votes
0answers
24 views

how to make my ldap client as sudo user in mac

I loged in as ldap client against ldap server authentication. when i open terminal and enter sudo -i, i get an error message that this user is not added in sudoers file. what to do get root ...
0
votes
0answers
14 views

sudoers: allow users to remove from their home directory

I'd like to add a sudoers rule that says users are allowed to remove files from their home directory , but I don't see any way to limit arguments to be a subdirectory of the users' home. Is there any ...
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
30 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
0answers
13 views

sudo ENV_KEEP not always preserving

When I run sudo -s, my environment is preserved. However, when running a simple sudo <command> it appears not to be preserved. The contents of my sudoers file: mafro@ip-10-xx-xx-250:~ > ...
0
votes
1answer
30 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
172 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
59 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
34 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 ...
1
vote
1answer
122 views

How can I override a default of rootpw in sudoers

I have a sudoers file with many entries. At the top is a Defaults setting: # default sudo password is the ROOT password (not the invoking user's password) Defaults rootpw However there is one ...
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 ...
0
votes
0answers
32 views

What is wrong with this configuration of sudoers file?

I have to execute a shell script as another user, but without be prompted for password. I've edited the etc/sudoers file with visudo, adding the following line. _www localhost=(otheruser) ...
0
votes
2answers
1k views

How do I fix an invalid /etc/sudoers file if root access is disabled?

This pertains to my Raspberry Pi, on which I have Raspbmc installed. I do realize that there is a Raspberry Pi StackExchange site, but I figured I might get more eyes on this problem here. The issue ...
1
vote
0answers
37 views

sudoers syntax for specifying a list of executables

I want my user (username "wim" in group "wim") to be able to use sudo apt-get and sudo dpkg without needing admin password. I tried editing sudoers file with sudo visudo, and I added in this line: ...
1
vote
1answer
606 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, ...
0
votes
1answer
757 views

How to allow user to preserve environment with sudo?

I'm running into the following error trying to allow some environment variables to pass through to the new environment when running sudo: sudo: sorry, you are not allowed to preserve the environment ...
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
3k views

Why there is no sudoers file: “/etc/sudoers: No such file or directory”?

I am trying to add a new admin user, but: # adduser username admin adduser: The user `username' does not exist. # man sudoers No manual entry for sudoers # less /etc/sudoers /etc/sudoers: No ...
0
votes
1answer
877 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: ...
0
votes
1answer
332 views

Running phantomjs with shell_exec under cron job

I have something like this: $re = shell_exec("sudo /usr/local/share/phantomjs --version"); Unfortunately this gives me another problem: sudo: no tty present and no askpass program specified ...
0
votes
1answer
234 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 ...
0
votes
1answer
84 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" ...
0
votes
1answer
25 views

sudo for only ufw?

I want to allow the johnuser sudo access for just the ufw command. Is this the appropriate statement to write into /etc/sudoers ? johnuser ALL=(ALL) /bin/ufw I'd try this right away only I ...
1
vote
1answer
935 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 ...
2
votes
1answer
474 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
0answers
83 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
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
199 views

Admin group can sudo, but my user in admin group can't

I'm having trouble giving a user sudo access. I have Ubuntu 12.04 LTS on my new VPS. I made a user named portaljacker, added it to the admin group, and admin group is in the sudoers file as %admin ...
1
vote
3answers
292 views

cannot access crontab with sudo after being added to /etc/sudoers list

My user "craig" is in the /etc/sudoers file on my CentOS 5.6 VM, however when I try to access the crontab using the command below I am presented with an error message: sudo crontab -e -u ...
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: ...
9
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 ...
1
vote
1answer
577 views

sshpass installation

I want to use passwordless SSH for logging in. I used sshpass to achieve this. The problem is when I am trying to install sshpass through sudo apt-get install sshpass. It asks for password. After I ...
2
votes
3answers
4k views

Open root terminal without switching user (OS X)

I'm not in sudoers: ..... is not in the sudoers file. This incident will be reported. How can I sudo in this terminal window, without switching user? The well-known command sudo -u ...
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 ...
3
votes
1answer
6k views

Perrmission to run specific command by sudo as www-data users without password

I have a webserver that also plays internet radio. As www-data user I want to run some commands, for example I've made this in /etc/sudoers file: www-data ALL=(ALL) NOPASSWD: /usr/bin/amixer ...
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 ...
1
vote
1answer
179 views

sudo configuration & log for contractor

Next week, I will have a contractor install a web application on one of our servers. I created an account so that they can access our server through SSH. The system is CentOS. Basically, beside basic ...
0
votes
1answer
2k views

How do I give a group 'service httpd graceful' permission in sudoers without passwd prompt?

I'm currently trying to lock down my users a bit. I've created some users: www.foo www.bar and a group: apacheadmins Both www.foo, and www.bar are members of the apacheadmins group. They do ...
1
vote
1answer
484 views

sudo command trying to search for hostname

Recently, I have changed the sudoers file and the hostname through /etc/hostname. After changing this files, my sudo command is taking a lot of time. Also, it says sudo unable to resolve host ...
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
744 views

sudo access to view/edit a crontab

I wish to be able to edit, or at least view, a crontab that is on a server. Should I not be able to run this to do so: sudo crontab -u root When I do, I get this error: Sorry, user crmpicco is ...
1
vote
1answer
207 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
1answer
2k 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
0answers
568 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 ...
3
votes
2answers
601 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
260 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 ...