Jump to content

Recommended Posts

Posted

Hi Folks,

 

For those with Macs, does such a thing as a user profile manager exist, even if 3rd party? I can’t spot it in MacOS.

 

We’ve had our Macs for four years now and they are choked with dozens if not hundreds of profiles – they are domain joined so students login with their AD account. Four or five of them are now so low on space that they can’t run the latest Ventura update.

 

Oddly the user profiles from 2020/21 aren’t restricted to the user, so could be manually deleted, or worst case I will just wipe them and start over once I’ve confirmed any Y10/Y11 data isn’t local.

 

Thanks

Posted (edited)

I run the following bash script as a startup script in our labs to delete all local profiles except our local admin one on boot.

 

sudo /usr/bin/defaults write /Library/Preferences/com.apple.loginwindow PasswordExpirationDays 0Users_Array=( `ls /Users | grep -v Shared | grep -v localadmin` )for user in "${Users_Array[@]}"do    if [ "${user}" == "${User_Name}" ]; then        echo "skip user ${user} as they are logged on."    else        dscl . -delete /Users/${user}        rm -fR /Users/${user}    fidone

 

It keeps changing the code format when I paste it so attached a screenshot too.

 

Screenshot 2023-04-05 at 10.35.15.png

Edited by 2ilent8cho
  • Like 1
  • Thanks 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...