Category filter
Script to Delete User Account on Mac
When employees leave an organization, the co-operate devices assigned to them are re-distributed to other workers in the firm. Hence, organizations may require to delete the data and user account from the devices. However, manually doing this task is a time-consuming process. Hexnode lets you deploy scripts to delete the user account from Mac devices.
Scripting Language – Bash
File extension – .sh
Delete the user account
1 |
sudo dscl . delete /users/<username> |
Delete directories and files of the user
1 |
sudo rm -rf /users/<username> |
The user account and all associated data will be erased from the device if both commands are executed successively.