When an employee leaves, the device gets reassigned to another. Now we manually delete the user acc. which is a lot of down time for the device. Do we have an option to delete the acc without touching the device.
When an employee leaves, the device gets reassigned to another. Now we manually delete the user acc. which is a lot of down time for the device. Do we have an option to delete the acc without touching the device.
Hey @diane,
Thank you for reaching out to us.
With Hexnode UEM, you can remotely delete a user account by executing a set of commands using the Execute Custom Script action. To make use of the action, head over to Manage > Devices > select your device > Actions > Execute Custom Script.
To delete the required user account, execute the below Bash command after replacing the <username>
field with the target user name.
1 |
sudo dscl . delete /users/<username> |
Now, execute the below script after replacing the <username>
field with the target username to delete the directories and files of the user.
1 |
sudo rm -rf /users/<username> |
If the username contains spaces, omit them when substituting in the script. Executing these commands in succession will result in the complete deletion of the user account and related data.
The above scripts are obtained from third-party open-source sites, and hence, Hexnode will not be responsible for any damage/loss to the system on the behavior of the script.
Hope this clears your query.
Cheers!
Johan Blake
Hexnode UEM
Don't have an account? Sign up