LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices

Reply
 
Search this Thread
Old 09-29-2006, 04:16 PM   #1
ekdya
Member
 
Registered: Oct 2003
Posts: 280

Rep: Reputation: 30
sudo: shutdown: command not found


as a user, I am trying to fire
$ sudo shutdown -r now
it used to give me
fred is not in the sudoers file, so I modified my file and now it look like this
******************************************************
Defaults env_reset
Defaults env_keep = "COLORS DISPLAY HOSTNAME HISTSIZE INPUTRC KDEDIR \
LS_COLORS MAIL PS1 PS2 QTDIR USERNAME \
LANG LC_ADDRESS LC_CTYPE LC_COLLATE LC_IDENTIFICATION \
LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC \
LC_PAPER LC_TELEPHONE LC_TIME LC_ALL LANGUAGE LINGUAS \
_XKB_CHARSET"


root ALL=(ALL) ALL
fred ALL=(ALL) ALL
*****************************************************

but now when I try to fire it, it gives me
sudo: shutdown: command not found

how can I fire this command as a user?

thanks
 
Old 09-29-2006, 04:52 PM   #2
reddazz
Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 73
The shutdown command is not in your path. I think the shutdown command is located in /sbin or /usr/sbin which are usually only in roots path so you would need to add that to your normal users path.
 
Old 09-29-2006, 05:42 PM   #3
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: Tupelo, MS
Distribution: Gentoo
Posts: 6,926

Rep: Reputation: 124Reputation: 124
You could issue
Code:
mingdao@silas:~$ whereis shutdown
shutdown: /sbin/shutdown /usr/man/man2/shutdown.2.gz /usr/man/man8/shutdown.8.gz /usr/share/man/man2/shutdown.2.gz /usr/share/man/man8/shutdown.8.gz
to locate the shutdown binary file, then issue
Code:
sudo /sbin/shutdown -r now
and it will work.

Fire when ready!!!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
bash: rpm: command not found && sudo: alien: command not found Java_Code Ubuntu 7 07-28-2006 12:57 AM
sudo command not working startproc cmd not found Imajica21 Linux - General 2 04-14-2005 02:22 PM
sudo: readme : command not found vishal.thorat Linux - Security 3 07-17-2003 06:56 PM
bash: shutdown: command not found Mimicafe Linux - General 7 02-23-2003 03:44 AM
shutdown command not found matt Linux - General 6 07-24-2001 06:48 PM


All times are GMT -5. The time now is 07:00 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration