LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (http://www.linuxquestions.org/questions/fedora-35/)
-   -   sudo: shutdown: command not found (http://www.linuxquestions.org/questions/fedora-35/sudo-shutdown-command-not-found-488080/)

ekdya 09-29-2006 04:16 PM

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

reddazz 09-29-2006 04:52 PM

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.

Bruce Hill 09-29-2006 05:42 PM

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!!! :D


All times are GMT -5. The time now is 11:08 PM.