What have you found for these years?

2010-02-22

mac useradd? dscl?

dscl -- Directory Service command line utility

# simplest useradd
~> sudo dscl . create /Users/sftp

# setup shell
~> sudo dscl . create /Users/sftp UserShell /bin/sh

# setup password
~> sudo dscl . passwd /Users/sftp PASSWORD

# setup UID (how come this is not strictly required?)
~> sudo dscl . create /Users/sftp UniqueID 444

# setup group
~> sudo dscl . create /Users/sftp PrimaryGroupID 0

# setup home
~> sudo dscl . create /Users/sftp dsAttrTypeNative:home /Users/sftp

btw, see /var/log/secure.log for sshd log...

0 retries:

Post a Comment

All texts are licensed under CC Attribution 3.0