Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Modified the resolve.conf and hostname

Status
Not open for further replies.

khine

MIS
Jul 27, 2006
10
GB
Hello,
Is there way to restart the services without actually rebooting the machine.
I have inherited a SunOS5.8 and have set the hostname, resolve.conf and network IP details, but if I can avoid it I would rather not have to reboot the machine.

Thanks
 
how did you change the hostname? I suggest to use sys-unconfig program, when you inherit a machine and you want to integrate it into your env. sys-unconfig will halt!!!! your system and will ask some questins when rebooting the system. Look at the manpage for it to doublecheck what the command does.

BTW: resolf.conf works "on the fly"

Best Regards, Franz
--
UNIX System Manager from Munich, Germany
 
You can also edit these files to change the hostname -

/etc/hosts
/etc/nodename
/etc/hostname.xxn
/etc/net/ticlts/hosts
/etc/net/ticots/hosts
/etc/net/ticotsord/hosts

But as far as I know (I may be mistaken) you would have to reboot.
 
try and restart all networking from init.d (over the console)
eg
/etc/init.d/netsvc stop
/etc/init.d/netsvc start

do a "grep inet /etc/init.d/*" to find the scripts prob more than just that 1 on your box
 
hello again,
i tried running sys-unconfig and the system went through all the configuration settings.
set the eri0 to dhcp, this picked up an IP address, but the resolve.conf did not setup nor did the hostname for the machine.
any further advise on this will be most welcomed.

 
Probably a typo but the name of the file is actually /etc/resolv.conf. Check your /etc/nsswitch.conf, /etc/nodename, /etc/net/tic*/hosts, and with DHCP I believe it would be something like /etc/dhcp.eri0. I forgot what DHCP calls the file.
 
resolv.conf is a simple text file.

Just create it in /etc and put in your dns servers.
It should pickup the changes automatically.
sample resolv.conf:
_______________________
nameserver 68.87.69.146
nameserver 68.87.85.98
_______________________


also, make sure your /etc/nsswitch.conf
file points the hosts entry to host then dns.

sample:

hosts: files dns

Test with nslookup and see which server
it uses.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top