Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

command not found - init & shutdown 2

Status
Not open for further replies.

gilecrios

Technical User
Jul 30, 2002
6
AU
Hi All,

I have a perplexing problem:- When I try & shut my Redhat 7.2 machine down using either init or shutdown commands I get "command not found" from the Bash Shell

I can Halt the Machine & I can shutdown from X.

If I login to root using su -l root then the commands work.

In addition to this I hv been ahving some strange behavior with the start restart stop commands with Samba.

Any help is most appreciated as I'm still a newbie to Linux!

thks in adv.

gilecrios
 
System shutdown is really intended to be run by root only. You can still use ctrl-alt-del magic to take it down to reboot. If you want to change this, check /etc/sudoers and man sudo. If you need further information, let us know.
 
The shutdown command lives in /sbin, which is only readable by the root user. Only the root user has /sbin in its $PATH.

You can change the behavior of the Ctrl+Alt+Del key sequence in the /etc/inittab file by changing this line...

ca::ctrlaltdel:/sbin/shutdown -t3 -r now

If you comment this line out using a #, it will disable the three finger salute for everyone.


ChrisP
 
Thank you one & all !!!

With your help I have now found my solution.

I think my main problem was that when I was initially logging in I wasn't logging in as root so the permissions for things seemed to going a bit srewy. Now I am
I can ,stop, start, restart services with the service command - this wasn't working before(ie.command not found)

I have now altered my bashrc bash_profile & bash_logout to a satisfactory level.

thks again!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top