Mac Thread, Tips on a spring clean for our Apple Mac Network in Technical; Hi
Was wondering if I could get some tips on what other schools do when doing a spring clean of ...
16th July 2010, 01:04 PM #1
Tips on a spring clean for our Apple Mac Network
Was wondering if I could get some tips on what other schools do when doing a spring clean of the Apple Mac Server.
I am looking at simplier ways to do a cleanup of old accounts on our Open directory system on our Apple Macs.
I have noticed when I delete a user in workgroup manager it doesnt delete the user Home Directory.
Is there a way I can delete a user and it also deletes their home directory?
IDG Tech News
28th July 2010, 12:44 PM #2
- Rep Power
I wouldn't mind finding out myself.
Currently I run the gauntlet of manually deleting the HomeFolders off my RAID, which is very dull indeed. (after a full Retrospect backup obviously). It would be so much easier if we could get rid of all the student folders but we have to keep students who re-enroll for a further year.
I've helped things a bit by creating the shortname of each user to include their WGM UID at the start, whilst keeping the long Studio ID card number as their login name. This does help with the searching of folders but still not great.
Would be good to know if there's a quicker way.
9th September 2010, 03:20 PM #3
Having read this, it spurned me on to take a little look into it. I don't know if you guys have delved into this yourself. If so and you accomplished this how did you do it?
If not then this next little bit of info may be of interest...
Using the dscl command against an Active Directory server in the Directory Utilities search path (not sure if you have an integrated setup), you can extract certain information. We will look up the value given to the userAccountControl attribute. This attribute seems to be given a value of 514 if the account is disabled.
Replace name of an AD account with a real account name found in your AD.
dscl /Active\ Directory/All\ Domains/ -read /Users/"Name of an AD Account" userAccountControl
This will list the value of the userAccountControl for the user specified.
It also seems that the dscl command can take variables. So in theory we could look up the account in the AD using the dscl command and if the value = 514 then we could assume the account is disabled and remove/move the home dir.
I have a bit of an idea on how to go about this. I am not a brilliant coder/scripter though so there maybe an easier way.
We could export the users into a csv file and then create a variable using the username array and feed it into the dscl command where we could list the values of each user's userAccountControl value. Using an if/then ? command we could see if the values match 514 and remove the home dirs.
Last edited by HodgeHi; 9th September 2010 at 03:23 PM.
21st September 2010, 10:53 AM #4
It sounds great, however if you have students that have their accounts disable because of misuse this plan could go a little bit wrong...
Originally Posted by HodgeHi
I was experimenting on a test network using passenger to create all the home areas in yearly folders;
Year 10 folder = Year 10 areas
Year 9 folder = Year 9 area
Then just delete one folder with all the areas.
I have had them time to finish this though, so I can't say it WILL work.
By Tcsltd in forum Our Advertisers
Last Post: 15th April 2010, 11:20 AM
By SimpleSi in forum General Chat
Last Post: 27th January 2010, 12:42 PM
By RobFuller in forum Windows
Last Post: 12th January 2008, 12:11 AM
Last Post: 19th September 2006, 12:00 AM
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)