sudo for permission kill -HUP


 
Thread Tools Search this Thread
Operating Systems Solaris sudo for permission kill -HUP
# 1  
Old 05-11-2010
sudo for permission kill -HUP

Hi,

I'm trying to provide "/usr/bin/kill -HUP" command to one of the user using sudo file. I have configured sudo as following:

Code:
$cat /etc/sudoers
User_Alias AA=conadmin
Cmnd_Alias KILL1=/usr/bin/kill -HUPAA  ALL=NOPASSWD:KILL1

When I login as the user and execute 'sudo -l' command, it is showing errors and the user is saying it is prompting for password. Any idea how kill -HUP can be configured in sudo?

Last edited by pludi; 05-11-2010 at 01:40 AM.. Reason: code tags, please...
# 2  
Old 05-11-2010
a) Don't edit the sudoers file directly, use the visudo command instead, as it does a syntax check before saving.
b) Remove those aliases, and add the line
Code:
conadmin ALL = (ALL) NOPASSWD: /usr/bin/kill -HUP [0-9]*

# 3  
Old 05-11-2010
Thanks pludi...it works now.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

How do I give permission for the kill command?

<?php $comando = "kill -9 3104"; $output = shell_exec($comando); ?> I am running this web page, but it does not execute the command, in the log file it looks like this: sh: 1: kill: Operation not permitted How do I give permission to execute the command? (1 Reply)
Discussion started by: Rodrigo_Bueno
1 Replies

2. Shell Programming and Scripting

Executing bash file with sudo for the second time, leads to permission denied, for some commands

I have a script that checks if the script has been ran with sudo. If the script is not ran as sudo, the current script is being executed with exec sudo bash. You are asked for a password, you type in the password, success. Everything is perfect - the commands inside the script are ran as sudo.... (1 Reply)
Discussion started by: boqsc
1 Replies

3. UNIX for Advanced & Expert Users

Permission to kill a process

I'm on AIX. I have triggered an infinite loop process (to keep looking for input file availability for further process). At present only I can kill the process. In case my colleague wants to kill the process for any reason, how do I provide permission to others to kill the process? Currently... (3 Replies)
Discussion started by: krishmaths
3 Replies

4. Solaris

Adding user with Sudo permission in solaris 9

How can I add user with Sudo permission in solaris 9 ? I'm new in Solaris (2 Replies)
Discussion started by: ahmednoaman
2 Replies

5. HP-UX

Sudo entry required to set permission similar to ROOT without using password (PASSWD) change optio

Hi All I had installed sudo in HP UX 11.3 and it is working fine but not able to make entry required to set permission similar to ROOT without using password (PASSWD) change option for define user in /etc/sudoers file Please help if some know the syntex? :confused::wall: (2 Replies)
Discussion started by: deviltech
2 Replies

6. UNIX for Dummies Questions & Answers

grant sudo permission

Hi all, I have to grant sudo permission to a user. I have searched online and find that /etc/sudoers file needs to be changed with visudo command. As i am new to linux, this is not clear to me. Can anybody take an example and show me how exactly this done. Thanks in advance! (2 Replies)
Discussion started by: lramsb4u
2 Replies

7. UNIX for Advanced & Expert Users

Help on sudo permissions to kill others process

I have to setup a sudo permission for a userA, so he can su to become userB and be able to do ONLY kill -9 on userB owned processes. (2 Replies)
Discussion started by: rizsyd
2 Replies

8. Solaris

Can't sudo Using Group Permission

All: I'm having a problem with sudo on Solaris 5.10 that is giving me fits (and BTW, I'm a Linux admin by trade...). The issue is that I have a number of users (myself included) that cannot sudo to root to complete user admin tasks. Assuming the user is jdoe, and the group with the elevated... (3 Replies)
Discussion started by: rjlohman
3 Replies

9. Solaris

sudo permission

HI friends can i know how to assign sudo permission to normal user in solaris, and if not i want to assign few commands like format,user creation to normal user, i want to share few permission to normal user towork like a root in $ prompt. (2 Replies)
Discussion started by: kurva
2 Replies

10. UNIX for Dummies Questions & Answers

Sudo permission issue

folks; How can i give a group a sudo permission to execute only some command "like start/stop Apache", so every user in that group can sudo to use this as himself, i mean when he tries to sudo, he will be asked for a password (and make it so he must use his own NT password not a generic one) then... (6 Replies)
Discussion started by: Katkota
6 Replies
Login or Register to Ask a Question