Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] hostname probleme
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

rackathon
 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
Stormkings
Guru
Guru


Joined: 27 Sep 2002
Posts: 352
Location: Europe

PostPosted: Thu Oct 18, 2007 5:55 am    Post subject: [solved] hostname probleme Reply with quote

Hallo zusammen,
wie der titel schon sagt hab ich ein problem mit dem hostnamen. Mein rechner vergisst den nämlich andauernd obwohl er gesetzt ist. Manchmal hat nur root den hostnamen im prompt und der user nicht. Hat irgendjemand ne idee? So langsam nervts. Init-script läuft auch.
Hier ein beispiel:
Code:
dyas ~ # cat /etc/conf.d/hostname
# /etc/conf.d/hostname

# Set to the hostname of this machine
HOSTNAME="dyas"

Code:
david@noname ~ $

Code:
dyas ~ #


Last edited by Stormkings on Thu Oct 25, 2007 4:46 am; edited 1 time in total
Back to top
View user's profile Send private message
firefly
Veteran
Veteran


Joined: 31 Oct 2002
Posts: 3182

PostPosted: Thu Oct 18, 2007 6:42 am    Post subject: Reply with quote

wie sieht der inhalt von $PS1 für root und für den user aus?
_________________
Ein Ring, sie zu knechten, sie alle zu finden,
Ins Dunkel zu treiben und ewig zu binden
Im Lande Mordor, wo die Schatten drohn.
Back to top
View user's profile Send private message
Stormkings
Guru
Guru


Joined: 27 Sep 2002
Posts: 352
Location: Europe

PostPosted: Thu Oct 18, 2007 6:55 am    Post subject: Reply with quote

Das ist der inhalt der variable, ich denke allerdings nicht, dass das irgendeinen einfluss hat. der befehl hostname ergibt auch nur noname.
Code:
david@dyas ~ $ echo $PS1
\[\033[01;32m\]\u@\h\[\033[01;34m\] \w \$\[\033[00m\]
david@dyas ~ $ su
Password:
noname david # echo $PS1
\[\033[01;31m\]\h\[\033[01;34m\] \W \$\[\033[00m\]

Interessanterweise hat die erste konsole die ich öffne in kde den hostname richtig, die nächste wieder nicht.
Back to top
View user's profile Send private message
stalinski
Tux's lil' helper
Tux's lil' helper


Joined: 13 Jan 2005
Posts: 99
Location: Berlin,Germany

PostPosted: Fri Oct 19, 2007 4:05 am    Post subject: Reply with quote

Existiert bei dir die /etc/hostname?

Und was steht in deiner /etc/hosts?
Back to top
View user's profile Send private message
Knieper
l33t
l33t


Joined: 10 Nov 2005
Posts: 677

PostPosted: Fri Oct 19, 2007 5:38 am    Post subject: Reply with quote

stalinski wrote:
Existiert bei dir die /etc/hostname?

Warum sollte sie? Und /etc/conf.d/hostname hat er angegeben.
_________________
Je dümmer desto Gnome/KDE.
Back to top
View user's profile Send private message
toralf
Veteran
Veteran


Joined: 01 Feb 2004
Posts: 1139
Location: Hamburg/Germany

PostPosted: Fri Oct 19, 2007 6:25 am    Post subject: Reply with quote

Ist jetzt ernst gemeint : Ist /etc/init.d/hostname auch im boot level eingetragen ?
Back to top
View user's profile Send private message
Stormkings
Guru
Guru


Joined: 27 Sep 2002
Posts: 352
Location: Europe

PostPosted: Fri Oct 19, 2007 1:39 pm    Post subject: Reply with quote

Ja ist eingetragen und wird auch gestartet.
Back to top
View user's profile Send private message
stalinski
Tux's lil' helper
Tux's lil' helper


Joined: 13 Jan 2005
Posts: 99
Location: Berlin,Germany

PostPosted: Fri Oct 19, 2007 2:35 pm    Post subject: Reply with quote

Knieper wrote:
stalinski wrote:
Existiert bei dir die /etc/hostname?

Warum sollte sie? Und /etc/conf.d/hostname hat er angegeben.

Tja, wenn sie existiert wird sie anscheinend präferiert...

Was genau dazu führt, dass der hostname leer ist. (Wenn die Datei existiert aber keinen Inhalt hat).


Allerdings sollte es beim booten eine Warnmeldung geben.
Back to top
View user's profile Send private message
Stormkings
Guru
Guru


Joined: 27 Sep 2002
Posts: 352
Location: Europe

PostPosted: Wed Oct 24, 2007 6:17 am    Post subject: Reply with quote

Die datei existiert und enthält den hostnamen.
So langsam gehen mir die ideen aus. Könnte es evtl. mit dem networkmanager zusammenhängen. Allerdings würde ich den schmerzlich vermissen, da wlan damit ziemlich gut funktioniert.
Gruß, dk
Back to top
View user's profile Send private message
escor
Guru
Guru


Joined: 20 Sep 2004
Posts: 540

PostPosted: Wed Oct 24, 2007 8:22 am    Post subject: Reply with quote

/etc/hosts wäre mal interesannt
Back to top
View user's profile Send private message
Stormkings
Guru
Guru


Joined: 27 Sep 2002
Posts: 352
Location: Europe

PostPosted: Wed Oct 24, 2007 8:40 am    Post subject: Reply with quote

escor wrote:
/etc/hosts wäre mal interesannt

Code:

noname / # cat /etc/hosts
127.0.0.1 localhost dyas
Back to top
View user's profile Send private message
escor
Guru
Guru


Joined: 20 Sep 2004
Posts: 540

PostPosted: Wed Oct 24, 2007 9:18 am    Post subject: Reply with quote

versuch mal

Code:

127.0.0.1 localhost
192.168.x.x dyas.tuxnet dyas
Back to top
View user's profile Send private message
Stormkings
Guru
Guru


Joined: 27 Sep 2002
Posts: 352
Location: Europe

PostPosted: Wed Oct 24, 2007 9:28 am    Post subject: Reply with quote

Werd ich mal probieren, auch wenn ich nicht glaube, dass es etwas ändert.
Mir ist eben aufgefallen, dass es erst passiert wenn X gestartet wird. Vorher ist alles korrekt gesetzt.
dk
Back to top
View user's profile Send private message
Anarcho
Veteran
Veteran


Joined: 06 Jun 2004
Posts: 2850
Location: Wuppertal (Germany)

PostPosted: Thu Oct 25, 2007 3:04 am    Post subject: Reply with quote

Stormkings wrote:
Die datei existiert und enthält den hostnamen.
So langsam gehen mir die ideen aus. Könnte es evtl. mit dem networkmanager zusammenhängen. Allerdings würde ich den schmerzlich vermissen, da wlan damit ziemlich gut funktioniert.
Gruß, dk


Es liegt definitiv am networkmanager. Ich habe hier unter Gnome die gleichen Probleme. Manchmal wird auch einfach die IP-Adresse als hostname eingetragen. Das ist besonder ärgerlich weil man dann keine weiteren X-Windows starten kann wegen der Sicherheitsbestimmungen.

Ich wollte mir demnächste mal dien Sourcecode vom NM ansehen und gucken ob man das nicht einfach abstellen kann, denn meiner Meinung nach hat der NM nichts am hostnamen zu ändern.


EDIT:

Für mein Problem scheint es eine Lösung zu geben, ich werde es heute abend mal einstellen.
Vielleicht hilft es dir ja auch:

http://gentoo-wiki.com/NetworkManager#Gnome_Specifics
_________________
...it's only Rock'n'Roll, but I like it!
HOWTO:WLAN mit OpenVPN absichern | TOOL:useedit - USE-flag editor/changer
Back to top
View user's profile Send private message
Stormkings
Guru
Guru


Joined: 27 Sep 2002
Posts: 352
Location: Europe

PostPosted: Thu Oct 25, 2007 4:44 am    Post subject: Reply with quote

Vielen dank, das war die lösung!
Vielleicht sollte man den wiki-artikel ändern, weil es allgemeingültig ist und nicht Gnome spezifisch ist.
Back to top
View user's profile Send private message
dsiggi
n00b
n00b


Joined: 28 Aug 2007
Posts: 16
Location: Wilhermsdorf

PostPosted: Thu Nov 13, 2008 10:52 am    Post subject: Reply with quote

Hi,
ich hab das gleiche Problem. Leider funktioniert der Linkt mir der Lösung nicht mehr.
Hat jemand einen anderen Link, oder kann hier schreiben wir man das Problem lösen kann?

dsiggi
Back to top
View user's profile Send private message
notHerbert
Veteran
Veteran


Joined: 11 Mar 2008
Posts: 2228
Location: 45N 73W

PostPosted: Fri Nov 14, 2008 2:08 am    Post subject: Reply with quote

Vielleicht hier http://www.gentoo-wiki.info/NetworkManager
Back to top
View user's profile Send private message
dsiggi
n00b
n00b


Joined: 28 Aug 2007
Posts: 16
Location: Wilhermsdorf

PostPosted: Fri Nov 14, 2008 7:38 am    Post subject: Reply with quote

Ja,
an dieses HowTO hab ich mich gehalten. Aber ich finde nirgends den Hinweis mit den fehlenden Hostnamen.

dsiggi
Back to top
View user's profile Send private message
aleph-muc
Apprentice
Apprentice


Joined: 23 Jun 2004
Posts: 158
Location: Auf dem Land

PostPosted: Fri Nov 14, 2008 9:51 am    Post subject: Reply with quote

Hi,

das hast du vielleicht überlesen:

NetworkManager reads the /etc/dhcp/dhclient.conf to determine the hostname. If no value is assigned then an IP address is set as a hostname which can cause problems opening new windows in Gnome. To prevent this, add the following to /etc/dhcp/dhclient.conf:

File: /etc/dhcp/dhclient.conf
send host-name "YOUR_HOSTNAME";
supersede host-name "YOUR_HOSTNAME";

Gruß
aleph
Back to top
View user's profile Send private message
dsiggi
n00b
n00b


Joined: 28 Aug 2007
Posts: 16
Location: Wilhermsdorf

PostPosted: Fri Nov 14, 2008 10:23 am    Post subject: Reply with quote

Okay,
ein Fehler war, das ich die ";" am Ende der Zeilen vergessen habe.
Funktionieren tut es trozdem noch nicht.

dsiggi
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum