Using dscl to set user passwords without interaction
I'm trying to write a script to add users, and I'm stuck on setting the password. If I use:
dscl -u adminuser -P adminpass /LDAPv3/127.0.0.1 -passwd /Users/$username $newpass
It adds a crypt password to the ldap server. Users created in this way cannot login to the iChat server (the script is supposed to add new users for ichat). If I use WGM to manually change their password after creation, then they can. Is there some way to either set the password as an 'OpenDirectory' password from the start, or to change the crypt password to an OpenDirectory password, from the command line, without interaction or using Expect?
Thanks!
MBP 15", Mac OS X (10.5)