Re: how do I set 'home' for root

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2005-04-27 at 23:34 +0300, Bogdan Rotariu wrote:
> 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@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@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. 
> 

It looks like you are in a single-user or maintenance shell.

You should be able to do a "su - root" in that shell and get all of
root's environment restored and then be able to function.

This type of problem is why some of us tear our hair out when things go
wrong.

> try doing the su - user
> with the - so it can run .bash_profile and other shell related config files.
> if that doesnt work to try to export HOME=~
> or export HOME=/home/username
> 

to set the $HOME for root a simple "export HOME=/root" should do.




[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux