> I find that when I've logged in to Linux as user and then su to become
> root, that I don't have access to the shutdown command. An odd message
> about bash not being able to see shutdown command.
> 
> I run bash both as root and user. When I log in as root, su to user, I
> can shutdown after going back to root. But when I log in as user, I cannot
> su to root to shut down.

This is simply because when you su to root (or any other account
for that matter) you don't inherit root's path or other account
specific environment variables. If you su to root and then give 
an explicit path to the command you want (/usr/sbin/shutdown -h now)
it'll run. I may not have that path right, but if you're logged in
as root (not su'd, logged in from the start) and type "which shutdown"
it'll show you where it lives.


---
Bill Kocik
Information Systems
Medar, Inc.
E-mail: [EMAIL PROTECTED]
Web:    http://www.medar.com

Reply via email to