What is the best way to automatically delete user profiles after x days of inactivity (school lab environment)?

I work at a school where we have multiple Mac Carts that have 30 MacBooks per cart. We image the macs every summer to delete the older user profiles but we are looking for way to possible have this done automatically through out the year to help with HDD space. What is the best way to delete user profiles after...say 180 days.... of inactivity automatically? I am open to login hooks, bash scripts, etc. Anything to get the job done. Thanks for any help or advice.

A search here turned up this post Deleting inactive users
It appears that the script posted will do as advertised though I would test it out on your systems and under your conditions to see if it does do what you need.
regards
Message was edited by: Frank Caggiano - That script looks for users over 21 days. To look for ones over 180 days change the 21 to 180 in the find command.

Similar Messages

  • WHat is the best way for other iphone users to share pictures with me?  I am doing a project which req. people to send me 100 pictures at a time that I'll be putting in my iphoto?

    WHat is the best way for other iphone users to share pictures with me?  I am doing a project which req. people to send me 100 pictures at a time that I'll be putting in my iphoto? thank you.

    ingridlisa,
    I'd suggest to ask them to create Shared PhotoStreams and to invite you to view the streams, see:
    iCloud: Using and troubleshooting Shared Photo Streams
    Regards
    Léonie
    Added:
    that I'll be putting in my iphoto?
    Will you be collecting the photos in iPhoto on your iPhone or on a Mac? On a Mac a Shared PhotoStream requires Mac OS X 10.8.2.

  • What is the best way to manage 5 users and 6 devices? We dont all want the same merged contacts, we dont all want the same calendar notes, music, pics etc etc.

    What is the best way to manage 5 users and 6 devices? We dont all want the same merged contacts, we dont all want the same calendar notes, music, pics etc etc.

    As long as it is pointed to iTunes it will be accessible via home sharing on Apple TV.
    http://support.apple.com/kb/HT1751?viewlocale=en_US&locale=en_US
    If these are commercial DVD's we can't comment on any conversion process.

  • What is the best way to turn on my ipod after it has been in water? should i just turn it on or should i plug it in and let it turn on on its own?

    what is the best way to turn on my ipod after it has been in water? should i just turn it on or should i plug it in and let it turn on on its own?

    Firstly, give your Pod a lot of time to dry out before trying to use it - at least a week, a fortnight might even be advisable. Water takes a surprisingly long time to evaporate from inside something.
    For a case, what you want is the Griffin Survivor:
    http://www.griffintechnology.com/armored

  • What is the best way to create 10000 users in ECC system

    Dear all,
    what is the best way to create 10,000 users in ECC 6 system.
    As of my knowledge we can create with SECATT, but I don't know the procedure to use this.
    please guide me...
    Regards,
    Raaja

    Hi Raaja,
    If you search in SDN or on google for eCATT tutorial, you will get all the info you need to learn to create them.
    For 10000 users I would suggest the following
    1. eCATT to create user ID's (include all the info like passwords, user groups in here).
    2. eCATT to make the role assignment.  Use SU10 to record the assignment to the users you created with the first script as it gives you more flexibility
    If you have the data you need then you should be able to run both steps in 1 work day (dependent on system performance).
    Edited by: Alex Ayers on Jan 25, 2009 11:16 AM

  • What is the best way to add/delete a VLAN from a MST instance?

    Over several switches? Is there a single command you can issue from the root switch that propagates the change?Thanks

    No. Unfortunately there is no such mechanism defined by the MST spec. The manual configuration of the mst regions is actually the trick that makes the protocol relatively simple... but not very flexible I admit.
    If you are running CatOS however there is a way to achieve this: VTP3 will take care of propagating the MST configuration along the VTP domain.
    Else, you'll have to configure the switches one by one, which is going to be painful and will disturb your traffic.
    You can take this opportunity to plan a little bit for the future. What you can do is create in the MST configuration more instances than you need and map evenly all the vlans to them.
    Suppose you currently need 2 instances and 10 vlans and that you may require up to 10 instances in the future:
    - create 10 instances by mapping 400 vlans to each (well, of course map the 10 vlans you currently use to the two instances you currently need).
    - make sure that the vlans for the 8 instances you don't currently need are not created (here I mean not created in the VTP database).
    Our MST code is optimized so that an instance is not run unless there is at least one vlan that is mapped to it and that is active on one port in the switch (the only exception is instance 0 that always exists.)
    Thus, the current setup does not require more resources that if you only had configured two instances with 10 vlans. Now, if you need a new vlan in one of your two current instances, you have plenty to choose from. If you need some vlans with a different topology: just use one that is mapped to an usued instance. This way, you can at least quietly add/remove vlan without disrupting the traffic because you are not modifying the VTP configuration.
    Hope this helps,
    Francois

  • What's the best way to transfer music between computers after iTunes Match?

    I've pretty much uploaded everything to iTunes Match now, but my collection is across two computers and so it has merged everything together... Which is fine. However, I was planning on moving some of my items from one computer to another (i.e. from my smaller iTunes Library on the MacBook to the main iTunes Library on my PM G5).
    Since it is all nicely synced now, I've discovered that if I use Home Sharing, then transferring the files manually seems to duplicate them on iTunes Match. So instead of doing this, I'm downloading them from the cloud on my PM and then deleting them on the MacBook once they're done... All good so far. However, a bunch of my music is in ALAC and so I don't want to do it this way because I'll end up downloading the files at 256kbps AAC instead.
    So I just wanted to know, is there a good way of getting already-synced ALAC files from one machine to the other without having to get iTunes Match to re-sync them all over again?

    You can preserve such metadata - worth an initial trial on simply moving as outlined - if metadata is lost you can reinstate by accessing the itunes library .xml file, to force itunes to read it you would need to clear the .itl file (if essential this will work but it is best avoided since it requires iTunes to rebuild your library from the .xml file).

  • What is the best way to remove Logic Pro 9 after installing X?

    That's the question. I did not install all the extra content from the boxed set of Pro 9.
    I read once that removing these pro applications wasn't as simple as just dragging the Application icon to the trash.

    On my Mac Pro where there really are Logic projects I have left it. On a laptop I have no projects and have one copy of Logic for perusing and learning and toying with. It's that laptop I want to remove Logic 9 from.
    Google gets you a list of about 25 things you should manually remove including receipts and god-knows-what.
    A call to Apple yesterday got me an agent who really didn't know and sent me an info article she said would tell me exactly. It literally said to remove the Preferences file. It was a troubleshooting document!
    But after a little frustration on my part she put me on hold. When she came back she said the new one would use resources of the old and so I should only delete the icon of the Application itself. It's only 800 or so MB as compared to the 30 GB or so of the original install. I thought the sounds in X were new and didn't want so many files hanging around.
    But I did only that, I trashed the Application icon only. And it took quite awhile to actually delete with a progress bar going across very slowly. Perhsps it took along many other things. I should have checked the total space remaining before and after.
    But really the question is still unanswered. For instance; Logic Node. Do I need that for X only? I'm sure there are many others. It's crazy Apple's tech faked her way through.

  • What's the best way to give a user the option of stopping a vi or rerunning it? I wrote something that works but I imagine it's not the best way to do it.

    I have a VI that runs a stepper motor then stops. I wanted the operator to have the option of rerunning the VI or stopping it completely. To do this I added a while loop around the entire VI.I have an example VI showing how I accomplished this, but I'm sure there's a more efficient approach. Any suggestions?
    Thank you.
    Solved!
    Go to Solution.
    Attachments:
    EX 1.vi ‏13 KB

    There is almost never a good reason to use the Stop Sign Abort Execution function.
    Your while loop is fine.  What you really want to do is make a state machine that has at least 2 states. 1.  Running the test.  2. Idle, waiting for the user to hit a run button again, or hitting an End program button.

  • What is the best approach to track deleted records

    Dear all,
    We have build a CMS platform which is based on SQL server 2012 tables structure hosted in Azure.
    We have build on top of this some REST API method in order to access data from any type of client application.
    The issues we need to solved now is what his the best way to track deleted records in order that client application gets informed through web service about deleted data from our CMS.
    We were thinking of 2 path actually :
    - having a kind of Ghost table for each of our real table where deleted records will be inserted into ( physical delete ). This would mean adding as many Ghost tables as we have production tables
    - Adding a IsDeleted flag to each of our table which will be set to true when a record is deleted from our CMS ( logical delete ). This would means adding an IsDelete field to each of our tables, create and update all our store procedure and web services
    in order to taken in account that new filter criteria to fetch our records. Quite huge job
    Will there be any other approach ?
    We are looking the best solution with minimum impact on our current solution
    reagards
    Your knowledge is enhanced by that of others.

    Hello,
    @Tom, based on your question
    "The question would be what do you need to do with the deleted records and how long do you need to keep them?"
    When records is deleted, then I simply want to delete them and informed any client application about deleted items in order to get data in Sync. I will not have any reporting on deleted data !
    The only reason of tracking delete tables items, is simply to informed client application through web service sync about the data to be ignored. Client application have a caching database records for performance reason and is is require to not used data
    from that local storage which has been reported as deleted by the SQL server on Aure.
    Does this make sense ?
    regards
    Your knowledge is enhanced by that of others.

  • Urchased a new desktop pc and I want to move itunes and all files including IPAD apps to my new computer and delete off my old one.  What is the best way to do this?

    I just purchased a new desktop PC and want to move Itunes and all my Ipad Apps to new computer, and delete off my old computer.  What is the best way to do this?

    Hi,
    See Here for Transferring your iTunes Library
    http://support.apple.com/kb/HT4527
    Make sure Everything is working to your satisfaction Before Deleting anything from your old computer...
    Cheers,

  • What's the best way to delete 2.4 million of records from table?

    We are having two tables one is production one and another is temp table which data we want to insert into production table. temp table having 2.5 million of records and on the other side production table is having billions of records. the thing which we want to do just simple delete already existed records from production table and then insert the remaining records from temp to production table.
    Can anyone guide what's the best way to do this?
    Thanks,
    Waheed.

    Waheed Azhar wrote:
    production table is live and data is appending in this table on random basis. if i go insert data from temp to prod table a pk voilation exception occured bcoz already a record is exist in prod table which we are going to insert from temp to prod
    If you really just want to insert the records and don't want to update the matching ones and you're already on 10g you could use the "DML error logging" facility of the INSERT command, which would log all failed records but succeeds for the remaining ones.
    You can create a suitable exception table using the DBMS_ERRLOG.CREATE_ERROR_LOG procedure and then use the "LOG ERRORS INTO" clause of the INSERT command. Note that you can't use the "direct-path" insert mode (APPEND hint) if you expect to encounter UNIQUE CONSTRAINT violations, because this can't be logged and cause the direct-path insert to fail. Since this is a "live" table you probably don't want to use the direct-path insert anyway.
    See the manuals for more information: http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_9014.htm#BGBEIACB
    Sample taken from 10g manuals:
    CREATE TABLE raises (emp_id NUMBER, sal NUMBER
       CONSTRAINT check_sal CHECK(sal > 8000));
    EXECUTE DBMS_ERRLOG.CREATE_ERROR_LOG('raises', 'errlog');
    INSERT INTO raises
       SELECT employee_id, salary*1.1 FROM employees
       WHERE commission_pct > .2
       LOG ERRORS INTO errlog ('my_bad') REJECT LIMIT 10;
    SELECT ORA_ERR_MESG$, ORA_ERR_TAG$, emp_id, sal FROM errlog;
    ORA_ERR_MESG$               ORA_ERR_TAG$         EMP_ID SAL
    ORA-02290: check constraint my_bad               161    7700
    (HR.SYS_C004266) violatedIf the number of rows in the temp table is not too large and you have a suitable index on the large table for the lookup you could also try to use a NOT EXISTS clause in the insert command:
    INSERT INTO <large_table>
    SELECT ...
    FROM TEMP A
    WHERE NOT EXISTS (
    SELECT NULL
    FROM <large_table> B
    WHERE B.<lookup> = A.<key>
    );But you need to check the execution plan, because a hash join using a full table scan on the <large_table> is probably something you want to avoid.
    Regards,
    Randolf
    Oracle related stuff blog:
    http://oracle-randolf.blogspot.com/
    SQLTools++ for Oracle (Open source Oracle GUI for Windows):
    http://www.sqltools-plusplus.org:7676/
    http://sourceforge.net/projects/sqlt-pp/

  • What is the BEST way to delete an app on an iPhone 4S so it will NOT be added back when I sync with iTunes?

    What is the BEST way to delete an app on an iPhone 4S so it will NOT be added back when I sync with iTunes?

    To completely remove an app and all of its data, do this: First delete the app on your phone, then in iTunes, under Library, click on Apps, right-click the app you want to delete & select delete, when prompted, move all files to trash, empty your trash. Connect your phone and sync. The app and all of its data will be gone.

  • What is the best way to delete folders and collections from Library?

    I have approximately 500 photographs in folders and collections. Want to delete them and start over. What is the best way to go back to Lightroom 5 cc as it was when initially downloaded?
    Using Mac running Maverick.
    Thanks for your help

    File>New Catalog and start over.
    The 500 images will stay put where they are and you can choose to import them again into the pristine catalog.

  • What is the best way to delete MacKeeper?

    I installed MacKeeper last year in an attempt to free up some hard drive space on my former hard drive. I now have a new SSD and have no need for MacKeeper. In addition, I see that this programme attracts a lot of negative press.
    What is the best way to delete MacKeeper from my hard drive and Time machine?

    Remove the "MacKeeper" crapware as follows. First, back up all data.
    "MacKeeper" has only one useful feature: it deletes itself.
    Note: These instructions apply to the version of the product that I downloaded and tested in early 2012. I can't be sure that they apply to other versions.
    IMPORTANT: "MacKeeper" has what the developer calls an “encryption” feature. In my tests, I didn't try to verify what this feature really does. If you used it to “encrypt” any of your files, “decrypt” them before you uninstall, or (preferably) restore the files from backups made before they were “encrypted.” As the developer is not trustworthy, you should assume that the "decrypted" files are corrupt unless proven otherwise.
    In the Finder, select Go ▹ Applications from the menu bar, or press the key combination shift-command-A. The "MacKeeper" application is in the folder that opens. Quit it if it's running, then drag it to the Trash. You'll be prompted for your login password. Then a dialog will pop up asking why you want to uninstall it. You don't have to provide that information. Enter anything you like in the text box, then click the Uninstall MacKeeper button. All the functional components of the software will be deleted. Reboot.
    Do not try to uninstall by dragging the MacKeeper icon in the Dock or the LaunchPad to the Trash.
    Here are some general suggestions. If you want your computer to be usable, don't install crapware, such as “themes,” "haxies," “add-ons,” “toolbars,” “enhancers," “optimizers,” "tune-ups," “accelerators,” “extenders,” “cleaners,” “defragmenters,” “firewalls,” "barriers," “guardians,” “defenders,” “protectors,” most “plugins,” commercial "virus scanners,” "disk tools," or "utilities." With very few exceptions, this kind of material is useless, or worse than useless.
    The more actively promoted the product, the more likely it is to be garbage. The most extreme example is the “MacKeeper” scam.
    The only software you should install is that which directly enables you to do the things you use a computer for — such as creating, communicating, and playing — and does not modify the way other software works. Never install any third-party software unless you know how to uninstall it.

Maybe you are looking for

  • PS CS6: It'd be helpful to have the option to collapse or expand the nested groups and layers.

    PS CS6: It'd be helpful to have the option to collapse or expand the nested groups and layers all at once.  Autodesk Maya has a similar feature in it's outliner that allows for you to do this.

  • Query base multiple levels  PO approval procedure

    Hi, My customer is having following requirement for PO approval procedure and would like to seek for solution. The suppliers are either CAPEX or OTHERS supplier which I think of using UDF U_CAPEXSUPPLIER=Y or N in BP master setup. OTHERS supplier PO

  • Download big files

    I am trying to download a big file from the internet. Currently I am doing the following:             URLConnection conn = downloadURL.openConnection();             InputStream in = conn.getInputStream();             OutputStream out = new FileOutput

  • Lightroom 4 (DVD) for installation on my MAC Desktop ?

    Recently received Lightroom 4 (DVD) for installation on my MAC Desktop. When I go to install I get an error message "Operation could not be completed ( com.apple.installer.page controller error-1).Couldn't open 'Adobe Photoshop Lighyroom 4. pkg'

  • On base output type

    Hi all, I have configured on base output type for 5 new output types. The  output type for one on base output type is not triggering in VF03. I have configured in OAC0,OAC2 and OAC3. Please let me know the what could be the reason. Thanks in advance.