Solved

Remote Shutdown

Posted on 2001-06-04
3
231 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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

rdate is a Linux command and the network time protocol for immediate date and time setup from another machine. The clocks are synchronized by entering rdate with the -s switch (command without switch just checks the time but does not set anything). …
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

627 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