Re: Scripting System Preferences
Re: Scripting System Preferences
- Subject: Re: Scripting System Preferences
- From: John W Baxter <email@hidden>
- Date: Thu, 16 May 2002 18:52:17 -0700
At 19:35 -0400 5/16/2002, Jason Bourque wrote:
>
I think it might be possible to change the xml preference files with
>
XMLTools.
>
>
You would have to know what to set it to. But a few changes in the control
>
panel would give you newly modified files.
man niutil and man defaults
With these beasts, you should be able to reduce a perfectly-functioning Mac
OS X installation to the "erase the disk and reinstall" state in a few
minutes. (Seriously, install X on a spare volume and ruin that with your
explorations...the truly careful person would use a sandbox machine or make
one by taking the disk(s) out of the regular machine and putting in a
sacrificial disk).
Then: do shell script "..."
Keep in mind the possibility of
touch /tmp/marker
{change a preference via the GUI}
sudo find / -newer /tmp/marker -ls
for finding what a given adjustment changes (and some extraneous log files
and whatnot).
Aside:
For those of us who aren't thrilled with Apple's (Next's) use of Sun's
NetInfo, I learned from an Apple engineer at an Apple presentation (to
SEASLUG, the Seattle Unix Users Group...I think the L comes from SeattLe
but what about the second "S") this week that NetInfo is going away in
Jaguar, to be replaced by use of LDAP. And the silly crypt-based
8-character significance passwords visible to any user are also going away.
[Such passwords can be cracked {a working password generated by brute
force, with no security alerts caused by trial and error, since the trials
and errors don't involve the machine containing the password} by a 1996-era
desktop machine in about 4 hours on average, given the encrypted form.]
The Aside means that what you learn about use of niutil will likely become
history in "late summer".
--John
NAME
niutil - NetInfo utility
SYNOPSIS
niutil -create [ opts ] domain path
niutil -destroy [ opts ] domain path
niutil -createprop [ opts ] domain path key [ val... ]
niutil -appendprop [ opts ] domain path key val...
niutil -mergeprop [ opts ] domain path key val...
niutil -insertval [ opts ] domain path key val index
niutil -destroyprop [ opts ] domain path key
niutil -destroyval [ opts ] domain path key val
niutil -renameprop [ opts ] domain path oldkey newkey
niutil -read [ opts ] domain path
niutil -list [ opts ] domain path
niutil -rparent [ opts ] domain
niutil -resync [ opts ] domain
niutil -statistics [ opts ] domain
and on and on.
NAME
defaults - access the Mac OS X user defaults system
SYNOPSIS
defaults [currentHost | -host hostname] read [domain [key]]
defaults [currentHost | -host hostname] read-type domain key
defaults [currentHost | -host hostname] write domain { 'plist' | domain
key 'value' }
defaults [currentHost | -host hostname] rename domain old_key new_key
defaults [currentHost | -host hostname] delete [domain [key]]
defaults [currentHost | -host hostname] { domains | find word | help }
--
John Baxter email@hidden Port Ludlow, WA, USA
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.