Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: hostname, mac Tiger
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: hostname, mac Tiger




Dunno if this is useful to what you want to know, but we use scutil to
set it via the command line (all part of our hostsetup script).

scutil --get LocalHostName
scutil --get ComputerName
scutil --set ComputerName foobar
scutil --set LocalHostName foobar

See 'man scutil'

--Andy

email@hidden wrote:
>>From: Dan Shoop <email@hidden>
>>Date: 2005/05/09 Mon PM 03:58:10 EDT
>>To: email@hidden,  email@hidden
>>Subject: Re: hostname, mac Tiger
>>
>>At 12:55 PM -0400 5/9/05, <email@hidden> wrote:
>>
>>>I have set my hostname using 'System Preferences',then 'Sharing'.
>>
>>That doesn't set hostname, that sets Computer Name. If you click the
>>"Edit" button that allows you to set your local name, i.e. Bonjour.
>>Neither of these is hostname.
>>
>>
>>>But when I use the 'Terminal', the shell prompt shows a different
>>>hostname depending on which network I plug my Mac into.
>>>
>>>The 'hostconfig' file does not any thing helpful either. Any suggestion ?
>>
>>Actually it does.
>>
>>The process for Mac OS detemrining hostname is that it uses what's
>>explicitly set in hostconfig. If that's set to automatic, it will
>>then check the following in order until it get's an answer:
>>
>>* The name defined by DHCP/BootP for your IP address
>>
>>* The DNS PTR for your IP address
>>
>>* The local hostname (Bonjour)
>>
>>* default if no resolution to 'localhost'
>>
>>So if you want to explicitly set your hostname, do so in hostconfig.
>>--
>>
>>-dhan
>>
>>------------------------------------------------------------------------
>
>
> The 'hostconfig' file in Panther allows one to set the hostname manually, but not any more in Tiger...
>
> ================================
> client-82-xx-x-xx:/etc alexlee$ cat hostconfig
> AFPSERVER=-NO-
> AUTHSERVER=-NO-
> AUTOMOUNT=-YES-
> CUPS=-AUTOMATIC-
> NFSLOCKS=-AUTOMATIC-
> NISDOMAIN=-NO-
> TIMESYNC=-YES-
> QTSSERVER=-NO-
> WEBSERVER=-NO-
> SMBSERVER=-NO-
> SNMPSERVER=-NO-
> SPOTLIGHT=-YES-
> CRASHREPORTER=-YES-
> ====================
>
>
>  _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Macos-x-server mailing list      (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
>

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Macos-x-server mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Re: Re: hostname, mac Tiger (From: <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.