[GRLUG] get back access to root

bfdamkoehler at worldnet.att.net bfdamkoehler at worldnet.att.net
Tue Sep 5 19:43:26 EDT 2006


I don't know your level of knowledge, so forgive me this is too 
detailed. I assume that your problem is caused by the new hostname not 
being /etc/hosts. Its seems like that might affect X windows but 
"shouldn't" bother any non-X apps.

    * login to your non-priv account
    * su
    * cd /etc
    * cp -v hosts hosts.save # make sure you have a saved copy in case
      of problems
    * vim hosts
          o shift o
          o newhostname nnn.nnn.nnn.nnn (replace newhostname with your
            new hostname and nnn.nnn.nnn.nnn with the IP address of your
            machine)
          o hit the ESC key and then type :wq

That "should" fix it, but you will still have the old hostname for your 
machine in /etc/hosts as well, which won't hurt anything. You can tell 
if its working by typing "ping newhostname" unless you have a firewall 
that blocks ping packets.






Michael Mol wrote:

>Did you check that /etc/hosts and /etc/hostname is sane?
>If not, can you fix them using sudo and vim?
>
>If you can't use sudo et al, try booting off of a livecd and edit the
>files that way.
>
>On 9/4/06, Bob Kline <bob.kline at gmail.com> wrote:
>  
>
>>* used hostname to change,  well,  the host name.
>>
>>*  now cannot get back in as root.  I get a message
>>   saying something like gethostbyname() doesn't work.
>>
>>What have I done to my self?   Is there a way to get
>>back in as root,  or have I found a way of locking myself
>>out of the system now?
>>
>>I won't even get in to why I tried to do this.......  :-(
>>
>>More tales of  the amateur.
>>
>>    -Bob
>>_______________________________________________
>>grlug mailing list
>>grlug at grlug.org
>>http://shinobu.grlug.org/cgi-bin/mailman/listinfo/grlug
>>
>>    
>>
>
>
>  
>



More information about the grlug mailing list