Editing System Preference in Terminal


 
Thread Tools Search this Thread
Operating Systems OS X (Apple) Editing System Preference in Terminal
# 1  
Old 10-14-2010
Editing System Preference in Terminal

Mac OS X 10.6: Leopard - I'm trying to create a script that will run on its own that can edit system preferences. I've done some digging, and found that a lot of system preference options are controlled by .plist files in ~/library/preferences, /library/preferences, and /system/library/preferences. However, I have yet to figure out how to edit certain functions. Specifically:
Turn on/off file sharing
Change screen saver
And some other functions like those.

My problem is twofold: For one, I can't find the file sharing plist file, and, secondly, I can't figure out a way to edit the plist files such that it makes any difference. For example, I found the plist file for screen saver, but try as I might, I couldn't get editing it to do what I wanted. And this was using plist editor. I'd imagine that once I try to port this to command line, it'll be even harder (presumably using the defaults write command). Any suggestions?
# 2  
Old 10-25-2010
The main caveat with what you want to do, is once you set a preference the end user can just change and/or delete your property list file (.plist) and you will just be back to square one.

A lot of what you can do, you can do via MCX. Here is what I would do in a nutshell, and I am sure if you Google this you will find better examples.

1) - download server tools
2) - Configure you client with Work Group Manager on the local Directory Services node
3) - Manage the computer exactly how you want to with the server tools running locally
4) - Once it is set up how you like it, export the MCX file for that user via dscl (directory services command line), and then you can write a log in hook script that imports that file when a user logs in

MCX cannot be modified or delete by the end user. Since Directory Services is very similar local client side as it is server side you can do this. The other option is to set up OS X Server running OD and then bind the client to the server and manage it that way.
Login or Register to Ask a Question

Previous Thread | Next Thread

7 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Help needed editing text file using the terminal

Hi, I have text file with the header like this tracking_id condition replicate FPKM XLOC_000001 alpha 1 10.3199 XLOC_000001 alpha 0 10.3686 XLOC_000001 alpha 2 15.5619 ... With the first column being genes, the second being the condition, the third... (5 Replies)
Discussion started by: 4galaxy7
5 Replies

2. Red Hat

Menu system for terminal like Putty for host /ip list

Is there a way to create a menu in Gnome terminal to have a list of hosts with ip's like in Putty on Windows? (2 Replies)
Discussion started by: jlouki01
2 Replies

3. OS X (Apple)

adding second password to preference or an app

Hi I am new to forum and glad I found this place. I have been searching for a way to add a secondary password to a preference pane such as date/time in Unix (Ox10.4.11) or to lock an application which I found a backdoor for access when password is not available. An app I use is a internet... (9 Replies)
Discussion started by: botchagalou
9 Replies

4. Linux

how to perform a system check on linux via terminal

hi im new to this and i just want to learn about linux and i just wanted to know how would i be able to perform a system check to see if a directory exists. can any one help me? (2 Replies)
Discussion started by: roozis
2 Replies

5. UNIX for Dummies Questions & Answers

Frustrating but simple preference question

So I am set up on a new box for work here and I have a frustrating preference issue. Whenever I hit backspace, it deletes a whole word instead of a single character. I understand that this is generally the functionality of hitting ctrl-backspace. I tried googling for a solution and dabbled... (3 Replies)
Discussion started by: jasondj
3 Replies

6. OS X (Apple)

Find file associated with GUI preference pane

The flat files associated with the GUI are very useful in scripting, like the DNS section of the network pref pane seems to be a front end for resolv.conf.. but sometimes I cannot seem to find the file associated with the GUI area so i was wondering what is an easy way to do this? I was... (1 Reply)
Discussion started by: glev2005
1 Replies

7. Solaris

How to change the system prompt and BG of terminal?

Hi all, I was wondering how to change the PS1 to my liking? I tried changing it using PS1='my choice' it worked but the subsequent terminals i open will not have it as the default PS1 ,how do i change it? also i am running as super user, and i need to exec bash, to get the bash environment...... (4 Replies)
Discussion started by: wrapster
4 Replies
Login or Register to Ask a Question