It would be nice if CreateLionUser.pkg could also “kickstart” and enable access for ssh (Remote Login), similar to what it does with ARD…
Not in Python yet but so far this works…
dscl . merge /Groups/com.apple.access_ssh GroupMembership $USER
dscl . merge /Groups/com.apple.access_ssh GroupMembers `dscl . read /Users/$USER GeneratedUID | awk ‘{print $2}’`
Or, better option…
dseditgroup -o edit -a $USER -t user com.apple.access_ssh
Only issue is it will fail if the ds node doesn’t exist, and I’m not quite sure how to create it. In terms of the GUI the action of clicking “Allow access for: Only these users:” flips the switch and creates > /var/db/dslocal/nodes/Default/groups/com.apple.access_ssh.plist
Using `systemsetup` would be a better option but unfortunately it only includes the following…
Usage: systemsetup -getremotelogin
Display whether remote login is on or off.
Usage: systemsetup -setremotelogin
Set remote login to either or . Use “systemsetup -f -setremotelogin off” to suppress prompting when turning remote login off.
Recent Comments