Change mailhost in /etc/host without reboot
I have to change the mailhost entry to point to another host on a few machines. Ho can i bring sendmail to recognize this change, just simply svcadm restart sendmail ist not enough. I had a few systems in the past which I rebooted, so it worked, but a reboot is not an option for these systems.
Fritz
Martin_Rosenau wrote:
Hello.
What settings did you change?
MartinHi martin
I have changed the below mentioned settings
o set semsys:seminfo_semmni=100
o set semsys:seminfo_semmns=1024
o set semsys:seminfo_semmsl=256
o set semsys:seminfo_semvmx=32767
o set shmsys:shminfo_shmmax=4294967295
o set shmsys:shminfo_shmmni=100
Thanks
Rajan
Similar Messages
-
Requery /etc/hosts without reboot
Hi all.
Does anyone know of a way to force any connection (browsers and ping) to requery the hosts file. My problem is best described with an example.
1. Go to www.apple.com
2. Add "192.168.1.2 www.apple.com" to /etc/hosts
3. Restart the browser
4. Go to www.apple.com (the change to the hosts file hasn't been applied)
5. Reboot the machine
6. Go to www.apple.com (the change has now been applied)
For various reasons i amend my hosts file fairly regularly and would like a way of seeing these changes being propagated without having to Reboot the machine.
I hope that explains my problem.
Regards
DuncanThanks for you quick reply, I tried that by going to system preferences / network and changed Configure IPv4 from Using DHCP to off, then back to Using DHCP.
I restarted the browser and ... no change I'm afraid.
So unless there is a better / different way to disable / enable the network I'm afraid that doesn't help.
I moved from Ubuntu to my Mac this morning. All I used to have to do was restart Firefox, which was annoying enough, now it looks like I have to reboot on top of that... -
Impact on changing mode of /etc/hosts to 600(rw-------)
Hi all,
I have a customer who asked us the imapct on changing mode of /etc/hosts to 600(rw-------) to an IQ server.
They have to change the mode as above due to a guideline from Government.
Is it ok with an IQ server if we change hostname in all scripts, such as .odbc.ini, to ip address for the machine where the IQ server is running ?
1. Would you please let me know what kind of impacts would be expected if the customer change the mode of the /etc/hosts file ?
2. Are there any points we should consider ?
Any replies would be highly appreciated.
Regards.
JerryAs long as gethostbyaddr() and gethostbyname() retrieve valid information for the local addresses, then you should be fine. IQ does not parse /etc/hosts directly.
see the man pages of gethostbyaddr and gethostbyname for more details on how name/ip resolution occurs.
jason -
How to change memory (-Xms, etc.) without configtool
Does anyone know what property file to modify to set VM parameters for the AS in NetWeaver?
I don't want to use the configtool. I want to modify the files that configtool modifies.Hi Farokh,
If you are using SAP Netweaver J2EE Server, that means > 6.20, you have to use AFAIK the Configtool because all the settings are saved in the Database and the config files are created at startup.
Regards
Gregor -
Hi, I'm just starting to look at a 10.4.10 server (intel dual-core xenon). All this server does is run Zimbra. I've noticed the person who set it up made some changes to the /etc/hosts file and was wondering what effect these changes could have on the system. Here is the hosts file. I've also noticed that PID 0 kernel_task is running at about 75% CPU ALL the time!!
# Host Database
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
127.0.0.1 hostname.company.com mail.company.com localhost mail hostname
255.255.255.255 broadcasthost
::1 localhost
192.168.1.265 mail.comapny.com hostname.company.com localhost mail hostname
Thanks for any help.
Pat.The first few lines of the hosts file should be...
# Host Database
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
Pat. -
How to save changes in /etc/system without system reboot
Hi
As I have one query in case I am updating /etc/system, is there any way to make the changes effective without rebooting the system.
Thanks
RajanMartin_Rosenau wrote:
Hello.
What settings did you change?
MartinHi martin
I have changed the below mentioned settings
o set semsys:seminfo_semmni=100
o set semsys:seminfo_semmns=1024
o set semsys:seminfo_semmsl=256
o set semsys:seminfo_semvmx=32767
o set shmsys:shminfo_shmmax=4294967295
o set shmsys:shminfo_shmmni=100
Thanks
Rajan -
Changing CPU/RAM without reboot
Hi,
I just want to know if I can change the amount of ram and cpu of a VM without rebooting in Oracle VM.
I did'nt find this information anywhere.
I tested XenServer before and I couldnt. But I did'nt have time to test that feature in Oracle VM so far.
Thanks!Fox Murder wrote:
I just want to know if I can change the amount of ram and cpu of a VM without rebooting in Oracle VM.Yes, you can -- the Oracle VM Manager allows you to change RAM and vCPU count (as well as NIC and Disk) information without a reboot. In Oracle VM Manager there are two memory settings for each guest: Maximum Memory Size and Memory Size. The first is the largest to which you can set a running guest, the second is the currently assigned memory size. With cores, whatever the number was when you started the guest is the maximum -- you can then reduce the number of cores within the interface without rebooting.
Any changes to maximum memory or core count requires a reboot of the guest, though. -
Oracle R12 installation successful after changing /etc/hosts
changing the localhost line
from
192.168.25.105 localhost.localdomain localhost
to
127.0.0.1 localhost.localdomain localhost
then installation is successfull!!!!
why is that?
ThanksHi;
192.168.25.105 localhost.localdomain localhost
to
127.0.0.1 localhost.localdomain localhostWhat is your server IP? Your /etc/hosts file should be like
127.0.0.1 localhost.localdomain localhost
192.xx.xx hostname.localdomain hostname
It already cover on installation guide
Regard
Helios -
VPN clinetside IP overlap - tweak /etc/hosts possible?
Hi,
Our internal IP range is 192.168.0.x
We have remote users who VPN in from client offices, hotels, airports, etc. If the clientside local network address is also in the 192.168.0.x range, VPN does not work correctly due to the overlapping address ranges. This happens often enough to be a serious problem for our road warriors.
Does anyone know whether /etc/hosts can be tweaked to be different for different Network Locations? Are there any other means to this end? If so we can create a VPN VLAN (say, 192.168.100.x) with our servers multihomed onto that VLAN smooth VPN access.
Thanks,
b.
PS. Apologies for cross-posting in client & server.Buckster: this can't be done without some serious hacks, and even so, would probably still involve manual changes when switching to a new location, and probably reboots as well.
Painful as it is, it will almost definitely be far easier to renumber your central office LAN (where the VPN server is). When I set up a LAN that I know might be VPN'd into in the future, I try to use an obscure range (i.e. 192.168.169.x, 10.30.50.x, 172.16.17.x, etc.) - that's unlikely to be used by the SOHO routers/firewalls commonly deployed in remote locations.
MacBook Pro Mac OS X (10.4.8) -
/etc/hosts, /etc/hostname.bgeN configuration
I am writing this to get help.
I have a Solaris 10 box.
bash-3.00$ uname -a
SunOS soft19 5.10 Generic_125100-10 sun4u sparc SUNW,Netra-240
I have the following stuff on this box,
bash-3.00$ cat /etc/hosts
# Internet host table
127.0.0.1 localhost
10.9.48.244 soft19-bge1 Secondary
10.9.16.121 soft19 loghost
#10.9.48.244 soft19 Secondary
bash-3.00$ cat /etc/hostname.bge0
soft19
bash-3.00$ cat /etc/hostname.bge1
soft19-bge1
bash-3.00$ ifconfig -a
lo0: flags=2001000849 mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
bge0: flags=1000843 mtu 1500 index 2
inet 10.9.16.121 netmask ffffff00 broadcast X.X.X.255
bge1: flags=1000843 mtu 1500 index 3
inet 10.9.48.244 netmask ffffff00 broadcast X.X.X.255
In our code base, we have the following,
struct hostent *hp;
hp = ACE_OS::gethostbyname(myhostname); // myhostname is soft19
hp->h_addr_list[0] will give 10.9.16.121
Everything is correct here!!
Now I change the configuration a bit,
bash-3.00$ cat /etc/hosts
# Internet host table
127.0.0.1 localhost
#10.9.48.244 soft19-bge1 Secondary
10.9.16.121 soft19 loghost
10.9.48.244 soft19 Secondary
and now
hp->h_addr_list[0] will give 10.9.16.121
hp->h_addr_list[1] will give 10.9.48.244
but when I reboot the system, I get the following,
bash-3.00$ ifconfig -a
lo0: flags=2001000849 mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
bge0: flags=1000843 mtu 1500 index 2
inet 10.9.16.121 netmask ffffff00 broadcast X.X.X.255
bge1: flags=1000843 mtu 1500 index 3
inet 0.0.0.0 netmask ffffff00 broadcast X.X.X.255
And I know this is because
bash-3.00$ cat /etc/hostname.bge1
soft19-bge1
Now I change /etc/hostname.bge1 to have just soft19
and I reboot the system and what I see is this
bash-3.00$ ifconfig -a
lo0: flags=2001000849 mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
bge0: flags=1000843 mtu 1500 index 2
inet 10.9.16.121 netmask ffffff00 broadcast X.X.X.255
bge1: flags=1000843 mtu 1500 index 3
inet 10.9.16.121 netmask ffffff00 broadcast X.X.X.255
Which is correct again!
Now my question is
With this
struct hostent *hp;
hp = ACE_OS::gethostbyname(myhostname); // myhostname is soft19
I want to have the following,
hp->h_addr_list[0] will give 10.9.16.121
hp->h_addr_list[1] will give 10.9.48.244
How can I get this even if the system reboots?Hi, Thanks, but I know this. And was expecting the same.
But my question still remains unanswered..
How to tweak /etc/hosts and /etc/hostname.bgeN files for....
With this code
struct hostent *hp;
hp = ACE_OS::gethostbyname(myhostname); // myhostname is soft19
I want to have the following,
hp->h_addr_list[0] will give 10.9.16.121
hp->h_addr_list[1] will give 10.9.48.244
One more thing, I want to get this all the time, even my system reboots.
I know a method to get below [by modifying /etc/hosts file]
hp->h_addr_list[0] will give 10.9.16.121
hp->h_addr_list[1] will give 10.9.48.244
but this will not work when the system reboots? I am looking for a permanent solution.
Thanks,
Atul -
/etc/hosts and /etc/inet/hosts
we're running Sol10x86 11-06 and notice that there's no link between /etc/hosts and /etc/inet/hosts as there has been on some previous versions. /etc/hosts is the only file that contains all of the info for our IPMP configuration, and that seems to be enough during reboot.
what looks at /etc/inet/hosts? any danger in making /etc/inet/hosts a link to /etc/hosts?I don't have a copy of 11/06, but I've never seen a default installation of Solaris without that link.
It's certainly there in 08/07. Is there any chance that whatever process is populating /etc/hosts on your machines is breaking that link?
Darren -
[SOLVED] Strange line in /etc/hosts
I was checking my /etc/hosts when I came across this line:
64.50.236.214 releases.mozilla.org
Should that line be there? Is it safe?
That ip points to a mirror site.
Last edited by Skoll (2010-01-14 19:54:14)toxygen wrote:you didn't add it? you can always comment it out with a hash # and see if it gives you problems (restart network afterwards (sudo /etc/rc.d/network restart)). doesnt look like it would do any harm though, other than limiting you to that one mirror
No, I didn't. That's why I was so worried.
Edit: I can download plugins with Firefox even without that line. I found out that my brother had used an arch live cd to change /etc/hosts because he couldn't download plugins, the problem mcmillan mentioned.
Thank you guys for quick answers.
Last edited by Skoll (2010-01-14 19:53:39) -
How could a java process bypass etc\hosts file while doing dns lookup ?
Hi,
I am developing a java web proxy and developer tool [http://www.tcpcatcher.org|http://www.tcpcatcher.org] .
Right now it is working as a none transparent web proxy.
In some situation and for some hosts, I would like to turn it into a transparent web proxy.
Suppose, user's browser and java proxy are running on same host (typically on localhost). An entry is added in etc\hosts file, for example:
127.0.0.1 google.com
So without any change in browser config , if user visits google.com with its browser , http request is received at proxy level.
Now my proxy has to get the actual ip address of google.com bypassing the etc\hosts file (right now the proxy is doing a loop on itself).
Any idea how this could be achieved ?
Am I searching in wrong direction ?
thanks !This is a shot in the dark, but I'll try anyway.
Take a look at dnsjava (open source, I never played with it).
My understanding is that using this to resolve names instead of normal Java API's would allow you to bypass etc/hosts in the java code
(see [http://old.nabble.com/DNS-Resolve-from-hosts-file-first-then-DNS-Server-td15431381.html]). -
How to restart VSS writers without rebooting
Hello fellow teckies.
I'm having this problem when backing up with Symantec Backup Exec 11d where it generates errors about not being able to backup VSS sections on the C drive.
I've already posted with Symantec.
https://www-secure.symantec.com/connect/forums/vss-c-drive-errors-when-backing-server
They're saying to re-register and restart the services. My question is, can the services be restarted without rebooting?
Unfortunately rebooting is not an option as this is a critical production server.
If anyone can answer, please let me know.
Thanks :)What Santhosh mentioned is on the right direction. To restart a VSS writer, you need to restart the services or process that hosts the writer. Generally speaking, we will
take the following steps when encountering VSS writer related issues:
Retry the backup or restore operation that caused the error condition.
If this does not resolve the issue, restart the service or process that hosts the writer, and retry the operation.
If this does not resolve the issue, open Event Viewer as described in the "Open Event Viewer and view events related to VSS" section and look for events related to the
service or process that hosts the writer. If necessary, restart the service or process, and retry the operation.
If this does not resolve the issue, restart the computer, and retry the operation.
If restarting the computer does not resolve the issue, provide the Event Viewer information to the vendor whose application is indicated in the event text.
http://technet.microsoft.com/en-us/library/ee264212(WS.10).aspx
As for the impact of the restart, it generally will not cause bad effect. However, it depends on the service which is restarted. Generally speaking, a service should handle
all the related task, such as writing all data in memory into disk and committing the transaction, etc, when a properly restart operation is performed. If there are any particular requirement or order to follow to restart a service or application, you should
follow the recommended restart procedure.
Meanwhile, it is reported that when performing Shadow Copy Components backups with the File Server Resource Manager (FSRM) installed you may encounter this issue. Please
refer to the following Symantec article:
http://www.symantec.com/business/support/index?page=content&id=TECH48419
NOTE: This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control
these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the
use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.
Laura Zhang - MSFT -
Lil' script to update adblockfilter, adblocking via /etc/hosts file
hi, i've recently changed to adblocking via the hosts file (which works great btw), but i was missing filtersetupdating like in firefox, so i've created with my limited scripting skills this one...
# lil' script to update /etc/hosts adblock-filter
#hosts adblock filter taken from this site...
wget --directory-prefix=/tmp http://www.mvps.org/winhelp2002/hosts.txt
#Backup /etc/hosts to /tmp
cp /etc/hosts /tmp
#standard static hosts file
echo '# /etc/hosts: static lookup table for host names' > /etc/hosts
echo '#' >> /etc/hosts
echo '#<ip-address> <hostname.domain.org> <hostname>' >> /etc/hosts
echo '127.0.0.1 localhost.localdomain localhost' >> /etc/hosts
#add custom statc host configuration here
echo ' ' >> /etc/hosts
echo '###Ad-Blocking###' >> /etc/hosts
cat /tmp/hosts.txt >> /etc/hosts
echo '# End of file' >> /etc/hosts
rm /tmp/hosts.txt
enjoy!hosts_udate
#!/bin/bash
# 2012 Ontobelli for this script
# make hosts temporal directory
HOSTSDIR=~/.hostsupdate
mkdir -p "${HOSTSDIR}"
# make temporary directory
TMPDIR=/tmp/hostsupdate
mkdir -p "${TMPDIR}"
# set output file
OUTPUTFILE="${TMPDIR}/hosts"
# set temporal file
TMPFILE="${TMPDIR}/tmpfile"
if [ ! -f "${HOSTSDIR}/hosts.local" ]; then
echo "You need to create "${HOSTSDIR}"/hosts.local containing the hosts you wish to keep!"
exit 0
fi
# download the mvps.org hosts file.
wget -c -O "${HOSTSDIR}/hosts.mvps" "http://winhelp2002.mvps.org/hosts.txt"
# download hpHOSTS
wget -c -O "${HOSTSDIR}/hosts.hphosts" "http://support.it-mate.co.uk/downloads/HOSTS.txt"
# download hpHOSTS Partial
wget -c -O "${HOSTSDIR}/hosts.partial" "http://hosts-file.net/hphosts-partial.asp"
# download hpHOSTS ad/tracking servers
wget -c -O "${HOSTSDIR}/hosts.adservers" "http://hosts-file.net/ad_servers.asp"
# download the pgl.yoyo.org hosts Peter Lowe - AdServers
wget -c -O "${HOSTSDIR}/hosts.yoyo" "http://pgl.yoyo.org/as/serverlist.php?hostformat=hosts&showintro=0&mimetype=plaintext"
# download SysCtl Cameleon hosts
wget -c -O "${HOSTSDIR}/hosts.sysctl" "http://sysctl.org/cameleon/hosts"
# cat entries in a single file
cat "${HOSTSDIR}/hosts.mvps" > "${TMPFILE}0"
cat "${HOSTSDIR}/hosts.hphosts" >> "${TMPFILE}0"
cat "${HOSTSDIR}/hosts.partial" >> "${TMPFILE}0"
cat "${HOSTSDIR}/hosts.adservers" >> "${TMPFILE}0"
cat "${HOSTSDIR}/hosts.yoyo" >> "${TMPFILE}0"
cat "${HOSTSDIR}/hosts.sysctl" >> "${TMPFILE}0"
# tabs to space
sed -e 's/ / /g' "${TMPFILE}0" > "${TMPFILE}1"
# find relevant lines without comments
grep ^127.0.0.1 "${TMPFILE}1" > "${TMPFILE}2"
# remove duplicate spaces
cat "${TMPFILE}2" | tr -s [:space:] > "${TMPFILE}3"
# remove carriage returns
cat "${TMPFILE}3" | tr -d "\r" > "${TMPFILE}4"
# 0.0.0.0 is nicer than constantly knocking on localhosts' door.
sed -e 's/127.0.0.1 /0.0.0.0 /g' "${TMPFILE}4" > "${TMPFILE}5"
# remove inline comments
cut -d ' ' -f -2 "${TMPFILE}5" > "${TMPFILE}6"
# sort blocklist entries and remove duplicates
sort "${TMPFILE}6" | uniq > "${TMPFILE}7"
# remove unneeded blocked sites
grep -Ev ' dl.dropbox.com| host_you_want_to_whitelist' "${TMPFILE}7" > "${TMPFILE}9"
# write the user's hosts.local to head, then the blacklists
cat "${HOSTSDIR}"/hosts.local > "${OUTPUTFILE}"
cat "${TMPFILE}9" >> "${OUTPUTFILE}"
echo -e "# end of file" >> "${OUTPUTFILE}"
# move to /etc/hosts
mv "${OUTPUTFILE}" /etc/hosts
# delete temporary directory
rm -r -f "${TMPDIR}"
hosts.local
# /etc/hosts: static lookup table for host names
#<ip> <hostname.domain.org> <hostname>
127.0.0.1 localhost.localdomain localhost YOURHOSTSNAMEHERE
::1 localhost.localdomain localhost YOURHOSTSNAMEHERE
# YOUR PERSONAL list
# blocked list
Create an alias in your ~/.bashrc
alias hu='sudo /root/.hostsupdate/hosts_update'
Run
# hu <enter>
Script and cache must be located in /root/.hostsupdate or modify scrip accordingly
Cheers.
Last edited by ontobelli (2012-02-15 09:15:17)
Maybe you are looking for
-
On Mac OS X 10.6.6, MacBook Pro. When I launch Firefox I get an Alert that says, Could not initialize the application's security component. The most likely cause is problems with files in your application's profile directory. Please check that this d
-
My iPhoto won't open it says that the library is locked
I cannot access the photo library and all my iphone pictures are stored there and lots of pictures from my work that i dont have anywhere else
-
Controlling Namespace Prefix in OSB10gR3
Hi, I am doing a xquery transformation in my application, where I have defined a few namespaces with prefixes, but the prefixes get changed in my output. Is there anyway I can control the namespace prefixes. Thanks, Balaji.
-
Sleep light doesn't' blink...is this normal???
I very curious/concerned about my UBMBP 17 sleep light. It doesn't blink when sleeping. The light stays solid white when my notebook is sleeping. But funny it does blinks when I manually put it to sleep... is this normal? Thanks!!!
-
Webdynpro ABAP appication blank screen at portal.
hi all all ESS application in the portal working fine. i need to call standard webdynpro application in portal. balnk screen is coming. i tried with support desk...like system admiin--supportsap applicationwhere i choose webdynpro--tried to run stand