need fully qualified hostname before log-in - how?
my computer name is viking, but it needs to be viking.whatever.com (for a program I'm running). I can login as or su to root and use the hostname command, but that gets really tedious. How do I permanantly change the hostname?
|
Since you list your distro as RedHat, it uses the value from /etc/sysconfig/network. There should be a line in that file of the form:
Code:
HOSTNAME=viking Other distros do it different ways. Slackware, for instance, sets your hostname in /etc/rc.d/rc.M using the value in /etc/HOSTNAME (assuming there is one, otherwise it provides a default) : Code:
/bin/hostname `cat /etc/HOSTNAME | cut -f1 -d .` Hope this helps. |
First add the fqdn to /etc/hosts
Also, RedHat I think stores the fqdn in /etc/sysconfig/networks The standard used to be /etc/hostname, on Debian it still is, on Slack its /etc/HOSTNAME... poke around a bit for where it is one RedHat, hopefully someone else will just "know" and post it after me. Cheers, Finegan |
Quote:
On that note (maybe I should have made this a new thread... in another forum, but...) On another box, I have IRIX 6.5 (it's an SGI, obviously), and have no clue how to set the gateway. I noticed that the /etc/sysconfig/network file is where the gateway information is stored in RH... anyone have any clue as to where it's stored in IRIX 6.5? |
An old SGI... mmm, cool toy!
Aside from the guess that you could hand hack it with: route add default gw xxx.xxx.xxx.xxx I have no idea where its stored as a config. Really, post that somewhere under General and someone is bound to reply. Cheers, Finegan |
Quote:
Thanks for the tip on posting in the general forum. |
In IRIX, I believe the routing info is stored in /etc/config/static-route.options
(for all the Solaris dudes, out there, try /etc/defaultrouter ) However, I'm not an IRIX admin - I just play one on web forums ;) |
FYI: I just ran the route command (to set the default gateway on IRIX):
Code:
route add default router ip 1 |
All times are GMT -5. The time now is 06:25 AM. |