Solved

Remote Shutdown

Posted on 2001-06-04
3
230 Views
Last Modified: 2013-12-16
I'm pretty much a Newbie when it comes to Linux, so the answer to this question should be pretty simple.

I'm running Redhat 7 on an old PC, since I only have one monitor, I telnet into the linux box using a terminal emulator. Since noone can telnet using the root user, I go across as a user and then su. (I'm not very concerned with security at the moment)

But... if I do this, I cant run the shutdown command - in fact the bash shell doesn't even recognise it as a command, even though I can look it up in the manual.

Is this some kind of security? It means that I need to pull the monitor out of the PC and plug it into the Linux machine just to shut it down  -  something I'd like to do remotely.

Is there a configuration file somewhere or something I can do to permit a remote shutdown?

g
0
Comment
Question by:grahamn1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 40

Accepted Solution

by:
jlevie earned 50 total points
ID: 6154965
As an ordinary user /sbin (where shutdown lives) probably isn't in your PATH. You could add explicity invoke shutdown as "/sbin/shutdown -h now", or you could add /sbin to your PATH, or invoke "su - root" instead of "su". "su - root" will cause the login environment for root to be set up as if root had directly logged in and you'll be able to run shutdown and a number of other things that live in /sbin.
0
 

Author Comment

by:grahamn1
ID: 6155778
Thanks heaps - got it in one

g
0
 

Author Comment

by:grahamn1
ID: 6155782
Thanks heaps - got it in one

g
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question