Motherboard Forums


Reply
Thread Tools Display Modes

Changed host name, but not completely :-(

 
 





















JF Mezei
Guest
Posts: n/a

 
      11-14-2009, 12:12 PM


Used the system preferences to change my server's name (and updated all
the DNS info).

The DNS stuff works fine, including reverse DNS.

However, when I get to the command line, the prompt still shows the old
host name (the "\h in the prompt string (valiable PS1 in bash).

Anyone know where the Unix portion of a mac gets its host name ? (which
is used for stuff like the \h).

(This is on an Xserve, so perhaps it behaves a bit differently from a
real mac)

The /etc/hosts file contains no reference to the node, only the
localhost (127.0.0.1 stuff).
 
Reply With Quote
 
Kevin McMurtrie
Guest
Posts: n/a

 
      11-14-2009, 07:03 PM
In article <007a6ed7$0$17150$>,
JF Mezei <> wrote:

> Used the system preferences to change my server's name (and updated all
> the DNS info).
>
> The DNS stuff works fine, including reverse DNS.
>
> However, when I get to the command line, the prompt still shows the old
> host name (the "\h in the prompt string (valiable PS1 in bash).
>
> Anyone know where the Unix portion of a mac gets its host name ? (which
> is used for stuff like the \h).
>
> (This is on an Xserve, so perhaps it behaves a bit differently from a
> real mac)
>
> The /etc/hosts file contains no reference to the node, only the
> localhost (127.0.0.1 stuff).


Try playing with scutil. The Mac OS and FreeBSD layers might not be in
sync.

scutil --dns
(dumps DNS config)

scutil --get HostName
(For me, returns "HostName: not set" in 10.6 but returns the Bonjour
name in 10.6 Server.)
--
I won't see Goolge Groups replies because I must filter them as spam
 
Reply With Quote
 
David Empson
Guest
Posts: n/a

 
      11-15-2009, 08:05 AM
JF Mezei <> wrote:

> Used the system preferences to change my server's name (and updated all
> the DNS info).
>
> The DNS stuff works fine, including reverse DNS.
>
> However, when I get to the command line, the prompt still shows the old
> host name (the "\h in the prompt string (valiable PS1 in bash).
>
> Anyone know where the Unix portion of a mac gets its host name ? (which
> is used for stuff like the \h).
>
> (This is on an Xserve, so perhaps it behaves a bit differently from a
> real mac)


From past experience, the hostname is obtained by a DNS reverse lookup,
so perhaps the old name has stuck in a DNS server.

(I had a problem where my ISP's DNS server had an inapporpriate entry
belonging to a different customer in the 192.168.0 range, which happened
to match the IP address I was using for one computer on my home network,
so every time I used my laptop at home I got a funny name assigned to
it. It appears they have now fixed it.)

What do you get if you do a reverse lookup on your IP address, e.g.

dig -x 192.168.0.1

(substitute your server's IP address on its primary network interface).

--
David Empson

 
Reply With Quote
 
JF Mezei
Guest
Posts: n/a

 
      11-15-2009, 08:19 AM
David Empson wrote:

> From past experience, the hostname is obtained by a DNS reverse lookup,
> so perhaps the old name has stuck in a DNS server.


> dig -x 192.168.0.1



My IP address reverse looks up to the new node name. (velo).
(with dig, nslookup and host)

Someone mentioned the scutil: it appears to be unpopulated on OS-X server.

(And yes, I rebooted a number of times since changing the node name, and
yet, at the unix level, it still thinks it is the old name).


Both Server Admin and Server Monitor show the new node name in the
Info/Overview panes.


Looking at the log file for system.log:

> Nov 15 00:30:00 brakes newsyslog[30638]: logfile turned over
> Nov 15 01:15:05 brakes DirectoryService[29]: GSSAPI Error: Unspecified GSS failure. Minor code may provide more information (Server not found in Kerberos database)
> Nov 15 02:15:00 brakes com.apple.learnjunkmail[33628]: Can't find GUID for junk mail user junkmail
> Nov 15 02:15:00 brakes com.apple.learnjunkmail[33628]: No GUID found for: junkmail
> Nov 15 02:15:00 brakes com.apple.launchd[1] (com.apple.learnjunkmail[33628]): Exited with exit code: 1
> Nov 15 02:30:01 brakes com.apple.launchd[1] (com.apple.updatesa[34060]): Exited with exit code: 1
> Nov 15 02:55:54 brakes login[2833]: in pam_sm_authenticate(): Kerberos 5 error
> Nov 15 02:55:54 brakes login[2833]: in pam_sm_authenticate(): Kerberos 5 refuses you
> Nov 15 02:55:59 brakes login[2833]: in pam_sm_authenticate(): Kerberos 5 error
> Nov 15 02:55:59 brakes login[2833]: in pam_sm_authenticate(): Kerberos 5 refuses you
> Nov 15 02:55:59 brakes login[2833]: USER_PROCESS: 2833 tty.serial
> Nov 15 02:55:59 brakes login[2833]: afp home directory mount succeeded
> Nov 15 02:56:30 brakes sudo[34833]: jfmezei : TTY=tty.serial ; PWD=/Volumes/DMA2/Users/xxxxxxx ; USER=root ; COMMAND=/usr/bin/cu -l /dev/cu.usbserial-FT5R5SKKA
> Nov 15 03:15:00 brakes com.apple.launchd[1] (com.apple.wikid.logcompressor[35356]): posix_spawn("/usr/bin/logcompressor.sh", ...): No such file or directory
> Nov 15 03:15:00 brakes com.apple.launchd[1] (com.apple.wikid.logcompressor[35356]): Exited with exit code: 1
> Nov 15 03:15:05 brakes DirectoryService[29]: GSSAPI Error: Unspecified GSS failure. Minor code may provide more information (Server not found in Kerberos database)



"brakes" is the old node name, "velo" is the new one.
 
Reply With Quote
 
JF Mezei
Guest
Posts: n/a

 
      11-15-2009, 08:30 AM
Looking at the kernel log for the last boot:

When it activates the ethernet en0 (the only one configured for IP), it
appears to acquire the node name "brakes". Before that, it is just
"localhost".

> Nov 14 07:14:53 localhost kernel[0]: oscale = 4
> Nov 14 07:14:53 localhost kernel[0]: Kernel is LP64
> Nov 14 07:14:53 localhost kernel[0]: IPv6 packet filtering initialized, default to accept, logging disabled
> Nov 14 07:14:54 localhost kernel[0]: Intel82574L: Ethernet address 00:24:36:f3:a6:2c
> Nov 14 07:14:54 localhost kernel[0]: Intel82574L: Ethernet address 00:24:36:f3:a6:2a
> Nov 14 07:14:54 localhost kernel[0]: systemShutdown false
> Nov 14 07:14:55 localhost kernel[0]: NVDANV50HAL loaded and registered.
> Nov 14 07:14:55 localhost kernel[0]: Apple16X50ACPI1: Identified Serial Port on ACPI Device=UAR1
> Nov 14 07:14:55 localhost kernel[0]: Apple16X50ACPI::start FOUND DB9 Property for AAPL,connector
> Nov 14 07:14:55 localhost kernel[0]: Apple16X50UARTSync: Detected 16550AF/C/CF FIFO=16 MaxBaud=115200Previous Shutdown Cause: -128
> Nov 14 07:14:55 localhost kernel[0]: DSMOS has arrived
> Nov 14 07:14:55 localhost kernel[0]: ioqueue_depth = 128, ioscale = 4
> Nov 14 07:14:55 localhost kernel[0]: WARNING: ACPI_SMC_CtrlLoop::initCPUCtrlLoop - turbo enabled but no turbo P-state found
> Nov 14 07:14:56: --- last message repeated 7 times ---
> Nov 14 07:14:55 localhost kernel[0]: AppleTyMCEDriver::start coreVIDPID = 0xffffffff Number of packages = 1 Number of cpus = 8 memory monitor trough PCI
> Nov 14 07:14:56 localhost kernel[0]: GbE en0: en0 Link down
> Nov 14 07:14:57 localhost kernel[0]: GbE en1: en1 Link down
> Nov 14 07:14:57 localhost kernel[0]: Ethernet [Intel82574L]: Link up on en0, 100-Megabit, Full-duplex, No flow-control, Debug [796d,6c08,0de1,0200,41e1,4000]
> Nov 14 07:14:57 brakes kernel[0]: Ethernet [Intel82574L]: Link up on en1, 100-Megabit, Full-duplex, No flow-control, Debug [796d,6c08,0de1,0200,41e1,4000]
> Nov 14 07:26:32 brakes kernel[0]: AFP_VFS afpfs_mount: /Volumes/FTDIUSBSerialDriver_v2_2_14, pid 1329
> Nov 14 07:32:02 brakes kernel[0]: FTDIUSBSerialDriver: 0 4036010 start - ok
> Nov 14 07:32:32: --- last message repeated 7 times ---



 
Reply With Quote
 
Paul Sture
Guest
Posts: n/a

 
      11-15-2009, 02:06 PM
In article <007a6ed7$0$17150$>,
JF Mezei <> wrote:

> Used the system preferences to change my server's name (and updated all
> the DNS info).
>
> The DNS stuff works fine, including reverse DNS.
>
> However, when I get to the command line, the prompt still shows the old
> host name (the "\h in the prompt string (valiable PS1 in bash).
>
> Anyone know where the Unix portion of a mac gets its host name ? (which
> is used for stuff like the \h).
>
> (This is on an Xserve, so perhaps it behaves a bit differently from a
> real mac)
>
> The /etc/hosts file contains no reference to the node, only the
> localhost (127.0.0.1 stuff).


Is the following article useful?

<http://labs.hoffmanlabs.com/node/589#comment-1425>

--
Paul Sture
 
Reply With Quote
 
JF Mezei
Guest
Posts: n/a

 
      11-15-2009, 11:14 PM
Paul Sture wrote:

> Is the following article useful?
>
> <http://labs.hoffmanlabs.com/node/589#comment-1425>



Thanks for the pointer, and on the page that tells someone how to change
VMS hostname too :-)


Here is what I get:

sudo changeip -checkhostname
Password:

Primary address = 10.0.0.20

Current HostName = brakes.vaxination.ca
DNS HostName = velo.vaxination.ca

To fix the hostname please run /usr/sbin/changeip for your system with the
appropriate directory with the following values

/usr/sbin/changeip 10.0.0.20 10.0.0.20 brakes.vaxination.ca
velo.vaxination.ca

dirserv:success = "success"


Still doesn't tell me where it is stored, but at least I know how to fix
it !


Result: After a reboot, the prompt now shows the correct host name !

Thanks to Mr Sture for the pointer and of course Mr Hoffman for the page!
 
Reply With Quote
 
Paul Sture
Guest
Posts: n/a

 
      11-17-2009, 02:52 PM
In article <00f98641$0$23367$>,
JF Mezei <> wrote:

> Paul Sture wrote:
>
> > Is the following article useful?
> >
> > <http://labs.hoffmanlabs.com/node/589#comment-1425>

>
>
> Thanks for the pointer, and on the page that tells someone how to change
> VMS hostname too :-)
>
>
> Here is what I get:
>
> sudo changeip -checkhostname
> Password:
>
> Primary address = 10.0.0.20
>
> Current HostName = brakes.vaxination.ca
> DNS HostName = velo.vaxination.ca
>
> To fix the hostname please run /usr/sbin/changeip for your system with the
> appropriate directory with the following values
>
> /usr/sbin/changeip 10.0.0.20 10.0.0.20 brakes.vaxination.ca
> velo.vaxination.ca
>
> dirserv:success = "success"
>
>
> Still doesn't tell me where it is stored, but at least I know how to fix
> it !
>
>
> Result: After a reboot, the prompt now shows the correct host name !
>
> Thanks to Mr Sture for the pointer and of course Mr Hoffman for the page!


Thanks for the feedback JF. I find Hoff's site well worth visiting on
a regular basis for gems like this.

--
Paul Sture
 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Network Settings Changed by Another Application? Peace Power Apple 7 11-16-2008 10:11 PM
Re: USB host controller BULK Transfer problem. Ben Myers Dell 0 03-28-2008 01:43 PM
How to completely backup the old bios for future investigation ? (ALSO BIOS SECURITY TIP/IDEA !!) Skybuck The Destroyer Asus 7 06-17-2007 09:30 PM
Re: Learning how to use "Remote Login" Ian Gregory Apple 12 10-27-2006 02:17 PM
Postfix: can send but can't receive osiris@abydos.kmt Apple 24 07-12-2006 09:04 PM


All times are GMT. The time now is 09:39 PM.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43