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 ?
|
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 ? | ||||
|
feedback
|
|
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
| |||
|
feedback
|
For all OS X accounts
Here's how:
DisableIf not already disabled, then append
CheckTo check an account's enabled / disabled status:
For OSX System accounts: These accounts don't have an EnableTo 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. | ||||
|
feedback
|
|
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. | |||
|
feedback
|