Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Post-action to set openLdap




On 27/01/2005, at 7:01 AM, Abdulmajeed, Ahmed wrote:

I found that the information is saved "nested" in two .plist files, if it
was not nested then a simple "defaults write" command would do that. What I
am looking for specifically is an shell command that can replace a string of
text in a file, or if you know of another way!

You can use scutil to do this:

sudo scutil --set ComputerName thenewname
sudo scutil --set LocalHostName thenewname

We actually have a startup script on all our machines which sets this to be the same as the domain name.

If you're running 10.2, there's this little tool I wrote a while ago which does the same thing.

http://staff.cofa.unsw.edu.au/~nigelkersten/people/sw/ setnetworkname.html

Either run it as:
setnetworkname -h

 to set the name to the first segment of the hostname, or
setnetworkname networkname


scutil doesn't seem to have a man page, but here is the help.

nigelkersten@jitter:~ $ scutil --help
usage: scutil
        interactive access to the dynamic store.

   or: scutil -r nodename
   or: scutil -r address
   or: scutil -r local-address remote-address
        check reachability of node, address, or address pair.

   or: scutil -w dynamic-store-key [ -t timeout ]
        -w      wait for presense of dynamic store key
        -t      time to wait for key

or: scutil --get pref
or: scutil --set pref [newval]
pref display (or set) the specified preference. Valid preferences
include:
ComputerName, LocalHostName
newval New preference value to be set. If not specified,
the new value will be read from standard input.




_______________________________________________
Do not post admin requests to the list. They will be ignored.
Client-management mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/client-management/email@hidden

This email sent to email@hidden
References: 
 >Post-action to set openLdap (From: "Abdulmajeed, Ahmed" <email@hidden>)



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

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.