Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Remote Shutdown

Posted on 2001-06-04
3
Medium Priority
?
234 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 200 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: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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

Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
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.
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.
Suggested Courses

722 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