Delete all users except one?

hi there,
I'm in a lab environment where I need to be able to delete all user accounts except "Administrator" on remote machines from ARD that accumulate from unsuccessful syncs, etc.
Is it possible to run a selective rm -rf command that will do this? I've googled, but the solutions don't seem to work for me.
Thanks!

I found this article: http://snippets.dzone.com/posts/show/3908
It says to use this command:
find . ! -name "*.ogg" -exec rm -f {} \;
Adapted for my purposes:
find . ! -name "administrator" -exec rm -rf {} \;
I tried this on a folder called "test" on my local machine with folders named 1, 2, and 3 (keeping 2) and it worked, but I want to make sure this is a good idea before I push it out via ARD to 90 workstations. Thanks!

Similar Messages

  • How to diable delete button in PO for all users excepting one

    Dear All
    Please guide how to disable delete button in PO for all users excepting only one.
    Thanks

    Hi,
    check following link
    [Disable fields at item level in ME22N;
    [Disable Delete Button;
    Regards
    Kailas Ugale

  • Can i delete all users in one go?

    I am using SAP authentication. Afer defining my Entitlement system, under options i did not chose to Import users for the imported role.
    But All users for the imported rloe are imported. i dont want all users. It is painful as well to delete each user at a time for 500 users. How can i delete all users in a sinlge go?
    Please help
    --Krish

    This may ork: Try to set the Force user synchronization option under CMC->Authentication->SAP->Options and remove the role temporarily.
    Such a behaviour  can be xeplained only through the setting of the option Automatically import users under CMC->Authentication->SAP->Options . Even for a short period of time.
    You MUST create a role that contains only the SAP users you want to accept in your BOBJ system and import this role in the CMC
    Regards,
    Stratos

  • PO delivery date field to be made display for all users except one user

    Hi All,
    I have a specific requirement:
    The delivery date field in PO should be made display only at the time of changing the PO. I know pretty well that this can be achieved thru Define Screen Layout at document level, which inturn will make this field disaply mode to all users.
    But it should be in changeable mode only for one user. how can we achieve this.
    Any ideas, please
    /R
    Antony

    Hi ,
    You can create a authorization object(Z one) which can be assigned to the user id who need authorization of change .
    In the exit , you can specify the logic that if SY-USER (current user) has the authorization id , the system will allow to change . If the user doesn't have the object in his roles , the system would not allow to change .
    This will help in providing / removing access to any user id .
    Regards,
    Hari.

  • Time Machine has deleted all backups except one..?

    (Snow Leopard 10.6.8) Mac Pro.
    I've been backing up for at least 2 years using Time Machine on an internal 500Gb drive. Today I get a message saying the drive is full and when I check all backups over the last 8 months (approx) have gone. The only backup surviving is the one it did just before the message popped up. Have tried Repair disk and Disk Warrior, but they're still gone. Is this most likely to be a failing drive issue? And is there any chance I can recover them?

    Time Machine will not delete your old backups unless it starts to run out of space on the hard drive......or.....your backups have become corrupted and Time Machine cannot repair them.
    In the latter case, a message like this will appear on your screen:
    Do you recall seeing this message recently?

  • Is there any way to delete all cookies except those used on the home page?

    Is there any setting in Firefox which would permit me the deletion of all cookies on exit EXCEPT those associated with with specific pages? For example, the iGoogle home page requires a cookie to be set which recognizes the session created in a prior access. If all cookies are deleted on closure of Firefox, the user is required to sign in to iGoogle every time to see their home page. Currently you can delete cookies on exit or accept cookies based on exception. I would like to delete all cookies except those from permitted sources. There is no setting for this that I can find.

    You can let all cookies expire if you close Firefox and set an allow exception for domains that you want to keep the cookies from. Don't use [[Clear Recent History]] to clear cookies as that will remove all cookies including ones with an exception, but just let the others expire.
    You can always remove cookies manually, e.g. via a click on the favicon and More Information and View Cookies.
    You can see all permissions of the current domain here: Tools > Page Info > Permissions

  • Sophos Endpoint security: Block all websites except one

    I've been trying to find out how to block all websites except one, in an end user, by creating a policy in the Sophos Enterprise Console. I can see an option - Full web control but it requires an appliance. My question is, it is possible block all websites except one with Sophos? I appreciate if anybody knows, and can tell me how. I have downloaded the trial version of Sophos. If it's possible, I'll try Sophos ES for a year, for the end users and servers. 
    This topic first appeared in the Spiceworks Community

    Team Folder in the past was managed by administrators. Administrator can create, edit, delete team folders. The team folder can be published to a group of users, including Active Directory group. It is very convenient to share files and folders with a group of users in the same team. As team groups bigger, it may not be convenient for administrator to manage all the team folders. So it makes sense for administrator to assign some users to be able to manage team folder that they own themselves. Role Manager It usually starts with the role manager by creating a role with Add/Edit/Delete permissions and assign it to users or Active Directory groups. Manage Team Folder The user who are in the private team folder role will be able to manage team folders without seeing all the team folders from everyone. Here is a YouTube Video about...

  • ITunes Shared library with all users on one computer

    I am trying to share my iTunes (version 8.2) library with all the users on my computer. So far, this is what I have done:
    1) I have moved the music folder into the shared folder.
    2) I have selected "Add to Library" in all three accounts.
    3) I have tried checking and unchecking the "Copy files to iTunes Music folder when adding to library."
    Since then, I have added some CDs that had some songs that I already had. When I loaded these CDs, I deleted the duplicates that had the worse sound. Since then, everything is unwinding. The additions on one user account are not being added to the others. When I delete a track, iTunes (obviously) says that it can't find the song anymore. What's odd is that I then delete the one that is missing, and both are missing now: the one that I deleted on the original account and the one that I did not delete on the original account.
    I am starting to think that I need to start from scratch. So, to make a long story short (too late), how can I share my iTunes library with all users on one computer, where I can make a change in one account that will update automatically on the other accounts. If it can't be updated automatically, how can I add/delete files without causing the headaches I am currently having?
    Brian

    I actually followed this, but I still had problems that I listed above. Is there any way that when you make changes to one account (even if there is only one main account where changes are made), the changes are automatically (or at least easily) applied to the other user accounts?

  • Question about import all tables except one

    I have exported all tables for a user. While importing I want to import all tables except one table whose name I know. How do I do this? Example: If I have tables: Employee, address, salary that I have exported. While importing I want to import only Employee and address. How do I do this. The database I have exported contains over 20 tables.

    I don't think it is possible at all, you just need to explicitly specify all the tables.
    If you really don't want to include the single table, then you can import all the tables and drop the desired one.
    hare krishna
    Alok

  • Moved some Crystal Reports from 8.5 to 10. They all work except one.

    Moved some Crystal Reports from 8.5 to 10. They all work except one.
    The report runs, then stops.
    It brings up the Formula Workshop - Format Formula Editor - Suppress (No Drill-Down)
    Highlights one of the Formula Fields, which is in used as part of record selection, then stops

    Go to [http://service.sap.com]
    In that go to SAP Support Portal ->Help & support tab ->Report a Product Error
    You would have to supply Customer number and User ID and it would allow you to create a case (incident).
    You can also call on our CIC numbers if you face any issues and they would be able assist you in creating an Incident.
    Americas : 1 866 8907686 (toll-free)
    support.bosapamerica@ sap.com (Remove the space)
    APJ: 1800 613459 (toll-free)
    support.bosapasia@ sap.com
    EMEA: 08081012181 (toll-free)
    support.bosapemea@ sap.com
    Hope that helps!!
    Regards,
    Shweta

  • Using Powershell to delete all users from the Portal

    Summary
    This script will delete all users from the Portal except for Administrator and the Built-In Sync account.
    Based on Markus's "Delete a User" script.
    Useful when developing your system if you want to quickly clear out the data and start again.
    set-variable -name URI -value "http://localhost:5725/resourcemanagementservice' " -option constant
    function DeleteObject
    PARAM($objectType, $objectId)
    END
    $importObject = New-Object Microsoft.ResourceManagement.Automation.ObjectModel.ImportObject
    $importObject.ObjectType = $objectType
    $importObject.TargetObjectIdentifier = $objectId
    $importObject.SourceObjectIdentifier = $objectId
    $importObject.State = 2
    $importObject | Import-FIMConfig -uri $URI
    if(@(get-pssnapin | where-object {$_.Name -eq "FIMAutomation"} ).count -eq 0) {add-pssnapin FIMAutomation}
    $allobjects = export-fimconfig -uri $URI `
    –onlyBaseResources `
    -customconfig "/Person"
    $allobjects | Foreach-Object {
    $displayName = $_.ResourceManagementObject.ResourceManagementAttributes | `
    Where-Object {$_.AttributeName -eq "DisplayName"}
    if([string]::Compare($displayName.Value, "Administrator", $True) -eq 0)
    {write-host "Administrator NOT deleted"}
    elseif([string]::Compare($displayName.Value, "Built-in Synchronization Account", $True) -eq 0)
    {write-host "Built-in Synchronization Account NOT deleted"}
    else {
    $objectId = (($_.ResourceManagementObject.ObjectIdentifier).split(":"))[2]
    DeleteObject -objectType "Person" `
    -objectId $objectId
    write-host "`nObject deleted`n" $displayName.Value }
    Go to the FIM ScriptBox
    http://www.wapshere.com/missmiis

    The DeleteObject function opens and closes a connection for each object.  This approach is faster:
    http://social.technet.microsoft.com/wiki/contents/articles/23570.how-to-use-powershell-to-delete-fim-users-that-have-a-null-attribute-name.aspx
    Mike Crowley | MVP
    My Blog --
    Planet Technologies

  • How to delete all users quickly in EOP

    I need to delete all user inside my standalone EOP. I need to remove the domains but it won't let me since there are users in the domain. It will only allow 20 at a time to be deleted. I am sure there is a PowerShell way but I need this done ASAP.
    Thanks,
    Mike
    MRR

    As it ended up, I didn't need to because Microsoft resolved the issue after telling me at first they couldn't. :-) I am a little amazed no one responded to this. Maybe it is one of those so simple things they think we are morons for asking. :-) 
    MRR

  • HT4796 How do I combine all users into one? iTunes, documents, pictures?

    I just migrated files from my pc, to my new MacBook. I had multiple users on my pc and they transferred to my Mac in that way. Problem is, I don't want multiple users anymore.  Now that the files(itunes, pics, documents) are on my Mac, I want them all on one user. The admin user. One place.  Any idea how to move this stuff? Thank you!

    Depends on how much data there is in total. You could just save all the data into the 'Shared' folder on the hard disk by going into each account and making copies or moving the data you want to keep. When that's done, switch to the account you want to move it to and copy it all in from the 'Shared' folder.
    If there's too much for your HD, copy it all off to an external USB hard disk, delete all user accounts apart fromthe one you're going to use, then copy it from the external back into your admin user.

  • How to delete all HU in one storage type

    Dear experts I did use the /SCWM/ISU for uploading of the stock but now I need to change something in the structure of the storage bins.
    I cannot change anything, because the bins are having HU already. Could someone give me a tipp how I can delete all HUs from one specific storage type?
    Thanks in advance
    BR
    Denis

    Hi Denis,
    If the HUs are empty then the above solutions as Pet and Ifran mentioned should work for you.  Else, if you have stock in the HUs then you need to scrap the stock, you can do this using /n/scwm/adgi look up the HUs then scrap them.  This will empty the bins.
    Thanks,
    Faical

  • How do I set Firefox to be usable for all users on one computer?

    How do I set Firefox to be usable for all users on one computer?

    I would think the about:config entries discussed are ex-factory set to values each user has to change individually, after the installation has run its course. The solution could be to have patched files ready to install post factum:
    [https://developer.mozilla.org/en-US/docs/Mozilla/Preferences/A_brief_guide_to_Mozilla_preferences A Brief Guide to Mozilla Preferences - MDN]

Maybe you are looking for

  • Why i can not open my itunes how to solve this problem

    i have problem with my itunes version 10.3 but it said the file itunes library it could'nt be read it was created by new version of itunes where i can go to find the library of itunes or how to solve this problem..

  • Cannot get to old site designed on iWeb '08 via iWeb '09

    Hi there. I recently upgraded to Leopard and iWeb '09. I had previously designed some webpages using iWeb '08 (or possibly '07) which have been dormant for a while and I now want to take offline and revise. The pages were hosted at web.mac.com/leight

  • Scripting bugs and anomalies in Acrobat Pro XI

    I've downloaded the trial version of Acrobat Pro XI and starting testing it out with various scripts and actions. The results are far from good, I'm afraid. Here are some of my findings, so far: 1. The Action Wizard is very cumbersome and un-intuitiv

  • Bind by position? I got totally confused

    is it default that the parameters in the .net codes are binded to that in the pl/sql codes by position? i get totally confused. very simple codes in the pl/sql are like this: =========================== FUNCTION create_saint(saint_name IN VARCHAR2,sa

  • Security Issues with workbook

    Hello All, When I log into discoverer with some responsiblity "a" i am able to see the output of the particular workbook. But when the same work book ran by other user with differnet responsbility "b" and with with same parameters , he is geting the