The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
0answers
18 views

sudo - /etc/sudoers is world writable on Ubuntu OS

By mistake I change the permission of /etc/sudoers file on Ubuntu OS, now when applying any command using sudo, its giving error, sudo: /etc/sudoers is world writable sudo: no valid sudoers sources ...
0
votes
0answers
9 views

How to deny an specific user to reboot or shutdown in Red Hat 6 with visudo

Hello and thanks for helping me in this question. I just have in /ets/sudoers something like this: ##User Aliases <BR>**User_Alias CLIENT = jhonny </BR> CLIENT myserver = ...
0
votes
1answer
17 views

disable users from creating new shell instances

Is there any way I can disable users from creating new shell instances through sudoers file? also disable them to set any environment variables? I would like to write a line in the sudoers file ...
1
vote
1answer
23 views

force sudo to forget password immediately after exit everytime

If I execute sudo su, I am asked for my password ( [sudo] password for ... ) After do some stuff, I can leave this root mode with exit. If I execute again sudo su, I will not be asked for a password ...
0
votes
1answer
30 views

output of sudo -l confusing me

(habdbsync) NOPASSWD: ALL, (habdbsync) !/bin/sh, !/bin/ksh, !/bin/csh, !/bin/tcsh, !/bin/zsh, !/bin/bash, (habdbsync) !/bin/su, (habdbsync) !/usr/bin/ssh, !/usr/bin/scp, !/usr/bin/slogin (root) ...
0
votes
1answer
73 views

Replacement for “su user_with_sudo; sudo -s” for user without sudo-rights?

Let's say I have two user accounts: user (without any sudo permissions) user_with_sudo (with all sudo permissions) Now, I'm logged in as user but want to do something as root, e.g. switch to a ...
0
votes
0answers
44 views

Sudo suddenly not working correctly on OS X?

I have started noticing that commands requiring the use of sudo on OS X Mavericks are failing, e.g. I just updated Meteor and it couldn't write the launcher script sudo cp ...
1
vote
0answers
35 views

Adding group permissions with sudoers with NOPASSWD still prompting for password

Fedora 20, clean install. I added the following lines to my sudoers file with visudo: %power ALL=NOPASSWD: /sbin/shutdown I then created group "power" and added my account to this group. ...
2
votes
1answer
81 views

Prompted for root password even with sudoers edited with NOPASSWD

I'm trying to configure my sudoers file so that I'm not prompted for a password every time I need to access root privileges. I'm still getting prompted for my password, so if anyone has advise on ...
0
votes
0answers
38 views

Username expansion in sudoers file command possible?

I have the following in my sudoers file : User_Alias DU=%domain\ users DU ALL = NOPASSWD:NOEXEC: /sbin/mount.cifs \\\\* /home/* -o sec=krb5\,* ,/bin/umount -t cifs /home/* This works, users who are ...
1
vote
0answers
80 views

allow sudo user to execute multiple commands for only ONE file

I'm trying to allow only one user to be able to use only 'cat,head,tail' on some of the log files. What is the exact syntax to use here. I tried user ALL /bin/cat /var/log/maillog Which works ...
1
vote
1answer
13 views

Disable an #include instruction in sudoers

Can a sudoers #include instruction be disabled with an additional # character? Or rather just delete the leading # character? (I wish I would understand what the sudo developers had on their mind ...
0
votes
1answer
102 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
47 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
37 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
138 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
202 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
32 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
114 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
0answers
2k 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
125 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
28 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
53 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
208 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
106 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
38 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
2k 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
48 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
963 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
1k 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 ...
12
votes
1answer
13k 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
97 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?
1
vote
1answer
5k 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
1k 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
410 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
274 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
94 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
31 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
1k 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 ...
11
votes
3answers
29k views

How to check if I have sudo access?

I recently got into trouble because of this. $sudo vim /etc/motd [sudo] password for bruce: bruce is not in the sudoers file. This incident will be reported. Is there a way to check if I have ...
2
votes
1answer
555 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
110 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
73 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
234 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
361 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
105 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
4answers
3k 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
686 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
8k 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
305 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 ...