Hey, we have some macs in the office. Each employee has a separate user account on the mac. I need to get the list of all users in the mac devices. But, checking each device manually is a tedious and time-consuming task. Is there any other way to obtain this?
Also, I have to check the size of directories of some users to know if they have enough space to work.
Thank you for reaching out to us @noudtwan.
Yes, you can deploy custom scripts from the Hexnode portal to list all users on your macOS devices. Here is the script to get the job done.
Script to list users on Mac
1
dscacheutil-quser|grep-A3-B2-euid:\5'[0-9][0-9]'
Regarding your second query, you can find the size of home directories of required users with the command given below. The above script will also return the user’s home directory. Hence, you can use this information to determine the size of required users’ home directories.
Script to get the size of home directory of a user
1
du-sch/directory/path
Replace “/directory/path” with your user’s home directory.
The total size of the directory can be found on the last line of the output.
Please validate the script on a system before executing in bulk. Because if the script has any issue, it may put your devices at risk.
Hey @noudtwan, we have a new update on your concern. Hexnode comes with a new feature which lists all of your user accounts present on your macOS devices on the device page in the Hexnode portal. It also displays various details about the account such as the role, user ID, Secure Token status and much more. It also allows you to perform certain actions on the user accounts such as granting Secure Token, unlocking a user account, changing the user role and password and much more. Visit this link for detailed information.
Hope this helps! Peter Templeton Hexnode UEM
This reply was modified 1 year, 5 months ago by Peter.
This reply was modified 1 year, 5 months ago by Peter.
This reply was modified 1 year, 5 months ago by Peter.