To create a new Open Directory and MacOSX user on the Unix shell:
1. Create OD user:
root# dscl -u diradmin /LDAPv3/127.0.0.1 -create /Users/hans RealName „Hans Wurst“
root# dscl -u diradmin /LDAPv3/127.0.0.1 -create /Users/hans UserShell /bin/bash
root# dscl -u diradmin /LDAPv3/127.0.0.1 -create /Users/hans NFSHomeDirectory /Network/Servers/borg.loopback.org/Users/hans
root# dscl -u diradmin /LDAPv3/127.0.0.1 -passwd /Users/hans secret
2. create MaxOSX home directory:
root# createhomedir -u hans
creating home directories for (borg.loopback.org)
created (/Network/Servers/borg.loopback.org/Users/hans)
3. List OD Users:
root# dscl /LDAPv3/127.0.0.1 -list /Users
4. Get all entities for a user:
root# dscl /LDAPv3/127.0.0.1 -read /Users/hans
root# finger hans
Login: hans Name: Hans Wurst
Directory: /Network/Servers/borg.loopback.org/Users/hans Shell: /bin/bash
Never logged in.
No Mail.
No Plan.