LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 06-14-2001, 05:52 PM   #1
lowly_tech
Member
 
Registered: May 2001
Posts: 34

Rep: Reputation: 15

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
 
Old 06-15-2001, 04:49 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
errr.... surely /sbin isn't on your path....???

 
Old 06-15-2001, 04:57 AM   #3
ugge
Senior Member
 
Registered: Dec 2000
Location: Gothenburg, SWEDEN
Distribution: OpenSUSE 10.3
Posts: 1,028

Rep: Reputation: 45
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
 
Old 06-15-2001, 09:49 AM   #4
lowly_tech
Member
 
Registered: May 2001
Posts: 34

Original Poster
Rep: Reputation: 15
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
 
Old 06-15-2001, 09:58 AM   #5
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
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
 
Old 06-15-2001, 11:38 AM   #6
lowly_tech
Member
 
Registered: May 2001
Posts: 34

Original Poster
Rep: Reputation: 15
Thanks for all your help
 
Old 06-17-2001, 06:43 AM   #7
ugge
Senior Member
 
Registered: Dec 2000
Location: Gothenburg, SWEDEN
Distribution: OpenSUSE 10.3
Posts: 1,028

Rep: Reputation: 45
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.
 
Old 06-17-2001, 06:30 PM   #8
linuxcool
LQ Addict
 
Registered: Jun 2001
Posts: 1,183

Rep: Reputation: 47
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.
 
  


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
Please help on how to save services shutdown or shutdown from the terminal. wambuzz Linux - General 2 03-11-2005 08:38 AM
Linux full shutdown vs. manual shutdown? LQtoto Linux - General 9 01-26-2005 07:21 PM
unable to 'shutdown' from x... need to shutdown using 'halt' guitarnix Linux - Newbie 5 11-24-2003 02:00 AM
konsole shutdown possible? or key combo = shutdown possible? Laptop2250 Linux - Newbie 3 11-16-2003 11:44 AM
shutdown hang during eth0 shutdown kurtisw Linux - Networking 5 10-30-2003 03:49 PM


All times are GMT -5. The time now is 02:45 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration