[Casper] creating local user accounts

Thomas Larkin tlarki at kckps.org
Wed Sep 3 12:16:23 PDT 2008


So, I have to create local user accounts, on like a ton of machines.  I have a script ready that will use the dscl command to create a local user account for students to log in just in case they can't sync their mobile accounts.  however, I do know that Casper offers creating user accounts from the JSS via a policy.  

Now, my concerns are, how do I change the user template?  can I make a smart group based on local accounts?  Are there any known issues using the Casper built in policy, or should I stick with a script?  Anyone had to use this before?  I only ask all these questions because we are having directory problems, which I won't get into at the moment, but I need to push out local accounts to the machines so people can log in and run testing software.  

Here is the script:

#!/bin/sh

#Long Name: KCK Student
#Short Name: student
#Password: password


dscl . -create /Users/student
dscl . -create /Users/student UserShell /bin/bash
dscl . -create /Users/student RealName "KCK Student"
dscl . -create /Users/student UniqueID 505
dscl . -create /Users/student PrimaryGroupID 20
dscl . -create /Users/student NFSHomeDirectory /Local/Users/student
dscl . -passwd /Users/student password
dscl . -create /Users/student dsAttrTypeNative:_writers_hint: Typical password
dscl . -create /Users/student  
dsAttrTypeNative:_writers_LinkedIdentity: student
dscl . -create /Users/student dsAttrTypeNative:_writers_passwd: password
dscl . -create /Users/student dsAttrTypeNative:_writers_realname:  
student
dscl . -create /Users/student  
dsAttrTypeNative:_writers_UserCertificate: student

Thoughts?  Suggestions?

Many thanks in advance for any advice.

___________________________
Thomas Larkin
TIS Department
KCKPS USD500
tlarki at kckps.org
cell:  913-449-7589
office:  913-627-0351




More information about the Casper mailing list