LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Can't Shutdown (https://www.linuxquestions.org/questions/linux-newbie-8/cant-shutdown-3401/)

lowly_tech 06-14-2001 04:52 PM

I have setup a box that basically hosts a web page, ftp, mail, and several other services.
It has been on the internet for about 3 days now and I had to shut it down today and when I typed in shutdown now -h
it came back with bash: shutdown: command not found
I log in as myself then SU as root to issue the command.
The /sbin directory has a file called shutdown it is in green. What I am wondering is this possiblily a rootkit? I have read where hackers come in and install a rootkit and some commands stop working right. I checked all logs in
/var/log and I don't see any sign of any IP address except my own connections. My system is RH 7.1 The only thing I updated is xinetd but this shutdown problem didn't happen till today and the updated xinetd 2.1.8.9pre15-2 was installed about 2 weeks ago. I was just wondering if anyone knew as to why this would start doing this. Thank you for your help.

Jamie

acid_kewpie 06-15-2001 03:49 AM

errr.... surely /sbin isn't on your path....???


ugge 06-15-2001 03:57 AM

When you use su to change too root permission then your root path isn't added.
You will have to type /sbin/shutdown now -h

lowly_tech 06-15-2001 08:49 AM

When I type /sbin/shutdown it comes up with all file options. Thanks for your help. Where would I go to fix my path?? so it would shutdown from typing it in any directory.
Thanks again for all of your help.

jamie

acid_kewpie 06-15-2001 08:58 AM

setting PATH=$PATH:/sbin in /etc/rc.local or /etc/profile will set the value for all users. make sure to export it!

You might want some more security, so put the alteration in the root .bashrc instead. so you will ned to be root to use it. some installations will generally insist this anyway

chris

lowly_tech 06-15-2001 10:38 AM

Thanks for all your help

ugge 06-17-2001 05:43 AM

Another way of doing it to modify the /etc/inittab file to shutdown on ctrl+alt+del instead of rebooting.
Change ctrl+alt+del line to shutdown -h now
This way anyone with physical access to the computer can shutdown the computer.
A WARNING of security though.

linuxcool 06-17-2001 05:30 PM

lowly-tech, all you have to do to get your root path is enter the command as ' su - '. The hyphen will give you your root path instead of you keeping the user's path.


All times are GMT -5. The time now is 12:15 AM.