Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.