Is there any possible solution to disable a User from the CLI e.g. over SSH? There has to be a dscl command for that. Or is there a dsAttrTypeStandard attribute that I can set accordingly?
Any pointers ?
This works in 10.5 and 10.6 on LDAP/OD accounts:
Or for local accounts:
Replace ajohnson with the short username of the user you wish to disable.
To re-enable simply set "isDisabled=0" instead of 1. Or in the case of local accounts to any shell in
For all OS X accounts
If not already disabled, then append
To check an account's enabled / disabled status:
For OSX System accounts: These accounts don't have an
To re-enable the user account we just remove
Get the AuthenticationAuthority credentials for all users:
System accounts: Just remember that a system account must also have a valid login shell.
We have some OSX clients authenticating from a Linux LDAP server. What worked for me was setting a user's loginShell attribute to /usr/bin/false. This seems to prevent both SSH and graphical logins.