The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > OS Specific Forums > Linux
Google UNIX.COM


Linux RedHat, Ubuntu, SUSE, Fedora, Debian, Mandriva, Slackware, Gentoo linux, PCLinuxOS. All Linux questions here!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
sudoers tjmannonline UNIX for Dummies Questions & Answers 4 05-13-2008 06:45 PM
sudoers file questions hemangjani UNIX for Dummies Questions & Answers 2 04-21-2008 10:35 AM
sudoers on HP 11.11 dhlopomo UNIX for Dummies Questions & Answers 2 01-18-2008 03:03 AM
Parsing Sudoers File jasondavey UNIX for Advanced & Expert Users 3 08-30-2007 05:00 PM
sudoers file and Shutdown problem cobdeng UNIX for Dummies Questions & Answers 1 09-30-2005 06:20 PM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1  
Old 12-02-2004
whatisthis's Avatar
Registered User
 

Join Date: Aug 2004
Posts: 175
sudoers file

Hi,
I have edited 'sudoers' file to allow 'cads' user shutdown the system without providing a password.
Can someone tell me what's wrong with my file?
It's not working when I 'sudo SHUTDOWN' command:

sudo: SHUTDOWN: command not found


Thanks a lot!


# Host alias specification
Host_Alias DIALER=dmil3
# User alias specification

# Cmnd alias specification
Cmnd_Alias SHUTDOWN = /usr/cads/fldshut
# Override built-in defaults
##
Defaults syslog=auth
Defaults: DIALER !lecture
# User privilege specification
cads DIALER=NOPASSWD: SHUTDOWN
~
~
~
Reply With Quote
Forum Sponsor
  #2  
Old 12-02-2004
Registered User
 

Join Date: Aug 2004
Posts: 232
Do you need the full path to shutdown?

/sbin/shutdown


# %users localhost=/sbin/shutdown -h now
Reply With Quote
  #3  
Old 12-02-2004
whatisthis's Avatar
Registered User
 

Join Date: Aug 2004
Posts: 175
shutdown

I don't think so.
It should work this way since I created alias in the file?
Reply With Quote
  #4  
Old 12-02-2004
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,616
A command alias is used only inside the sudoers file. It doesn't create an external alias that the user can employ.
Reply With Quote
  #5  
Old 12-02-2004
whatisthis's Avatar
Registered User
 

Join Date: Aug 2004
Posts: 175
sudoers

Thanks,Perderabo!

I had it worked. It doesn't make sense if alias only used in the sudoers file....


THANKS for the help!
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 10:53 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0