image
image

Go Back   macosx.com > Mac Help Forums > Unix & X11

Reply
 
Thread Tools
  #1  
Old August 3rd, 2004, 07:02 PM
Registered User
 
Join Date: Sep 2000
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
skinlayers is on a distinguished road
Need help scripting user import

Hello,

I was wondering if someone could help me build a script to import the Client Control Database (CCD) from MacAdministrator 3.0 into Mac OS X Server 10.3. The CCD is stored in directories of XML files. Each XML file is named after the user's login name. This is an example of one of the XML files. We'll say the file is named 'user1':
Code:
<LoginEnabled>1</LoginEnabled>
<PrintCredits>0</PrintCredits>
<MacAdminPasswordOn>1</MacAdminPasswordOn>
<MacAdminPassword>password</MacAdminPassword>
<LoginList></LoginList>
Some files have addition entries like LastPasswordChange. Notice the password is stored in the XML file as plain text. Also, notice that the username is not contained in the XML, only the file name. Mac OS X Server 10.3 can import users in from an XML file, but the format is different than MacAdministrator. Example:
Code:
0x0A 0x5C 0x3A 0x2C dsRecTypeStandard:Users 3
dsAttrTypeStandard:RecordName dsAttrTypeStandard:Password
dsAttrTypeStandard:RealName
user1:password:user1
The one time record description at the top is not a problem. I can add that manually. The important part is the user1:password:user1. That's the actual user entry.
If you want to read more on the file format, and what the hex numbers at the top are for, look at this PDF.
So basically, I need a script to build an XML file by taking the password out of the MacAdministrator XML files, and putting the file's name on either side of the password seperated by ':'. I can then throw the example Record Descriptor in my second example, and import them all into Mac OS X Server 10.3.

Any Questions?
Thanks!
skinlayers
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump


All times are GMT -5. The time now is 09:47 PM.


Mac Support® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2000-2008 DigitalCrowd, Inc.