how do I set 'home' for root
Rick Stevens
rstevens at vitalstream.com
Wed Apr 27 20:10:45 UTC 2005
Claude Jones wrote:
> It's a long story, but I have pretty crippled system right now, including a
> messed up root user.
> When I su in a Bash terminal, instead of getting my usual prompt I get
> something quite different, and if I try to run a command, it aborts with an
> error like this:
>
> cj at viewridgeproductions2 misc]$ su
> Password:
> sh-3.00# kcontrol
> Aborting. $HOME is not set.
> sh-3.00#
>
> So root is lost - can someone help me tell it how to 'phone home'? I was
> wondering why I was getting the strange 'sh-3.00#' prompt in the third line
> where I used to get 'root at viewridgeproductions2 ]$' I think lines 4 and 5
> are my clue, but I don't how to fix this, or for that matter, how it got into
> this state.
"su" only changes the process' effective UID, but doesn't give you
root's environment. "su -" DOES give you root's environment (including
root's path and, yes, $HOME). It's equivalent to logging in as root.
----------------------------------------------------------------------
- Rick Stevens, Senior Systems Engineer rstevens at vitalstream.com -
- VitalStream, Inc. http://www.vitalstream.com -
- -
- To understand recursion, you must first understand recursion. -
----------------------------------------------------------------------
More information about the fedora-list
mailing list