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: changing computer list with dscl



On May 15, 2008, at 12:04 AM, David Garrett wrote:

Hello all.
I've poked about and learned a bit more about dscl than I did before (which is still not much) but I have one thing I would like to do that I cannot sort out.

I'd like to be able to feed a bash script a text file with the name or MAC addresses of a list of computers, and have the script call dscl and change which computer list each computer is in. Specifically I want to remove each computer from the Graphics computer list and add it to the GraphicsExams list. This is easy in WGM, but you have to do it one computer at a time, which is a pain. The bash scripting part of this task is easy, but I cannot sort out the syntax of dscl. Can anyone offer some tips?

Thanks
Dave



You'll want to change 127.0.0.1 to whatever is appropriate for your server:

dscl  /LDAPv3/127.0.0.1 -list /ComputerLists   (will display the computer lists you have defined)
dscl  /LDAPv3/127.0.0.1 -read /ComputerLists/Graphics Computers   (will display all computers in the Graphics list)

More info at "man dscl"

Marc
--
Marc Goldberg
marc@nextnewnetworks.com

aim: webmarc
desk: 646-274-4646
cell: 202-230-2170
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Macos-x-server mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/macos-x-server/email@hidden

This email sent to email@hidden

References: 
 >changing computer list with dscl (From: David Garrett <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.