The identity of the AD service: remove or disable users who are not?

We currently have set users to be 'disabled', but then he must remember periodically go and delete them manually. It also creates problems with duplicate user names. Do you automatically remove your users? I have always been concerned that if something goes wrong with a synchronization then all of my users would be deleted.

We had the same problem here, so I wrote an external operation that is grafted on to the user synchronization job and remove disabled users more than X number of days. For example, in our case, users are deleted after 180 days of being disabled (it's a little extreme). This way you can offer you a few days before that the users are actually deleted, but keep the automated process. There are a few options integrated, which should be visible from the source code. Here is the source:

package com.oracle.services.jobs;

import com.oracle.services.utility.SessionManager;
import com.plumtree.openfoundation.util.XPCalendar;
import com.plumtree.openfoundation.util.XPDateTime;
import com.plumtree.portaluiinfrastructure.resultwrapper.ASQueryResultWrapper;
import com.plumtree.server.IPTObjectManager;
import com.plumtree.server.IPTQueryResult;
import com.plumtree.server.IPTSession;
import com.plumtree.server.IPTUser;
import com.plumtree.server.IPTUserManager;
import com.plumtree.server.PT_LOCKSTATES;
import com.plumtree.server.PT_PROPIDS;

/*******************************************************************************
* This class supports the work of server automation for deletion of user accounts
* which have been disabled for a certain number of days.
*
hross * @author
*
*/
public class DeleteDisabledAccountsJob {}

filter to remove only agent disabled accounts
private static String FILTER_AGENT = 'this user has been locked by a user synchronization job.';

filter to delete the disabled accounts everything (including those disabled by one
Admin)
private static String FILTER_ALL = "";

Public Shared Sub main (String [] args) {}

check the arguments
If ((args.length < 2)="" ||="" (args.length=""> 4)) {}
System.Err.println ("use :");
System.Err
.println ("DeleteDisabledAccountsJob ");
System.Err
.println ("DeleteDisabledAccountsJob all the");
return;
}

get a session from the connection token
IPTSession session = SessionManager.createSession(args[0]);

get a number of days
int numDays = 0;
try {}
numDays = Integer.parseInt(args[1]);
} catch (Exception ex) {}
System.Err.println ("number of days not a valid integer.");
return;
}

filter all or just the agent?
Boolean filterAll = ((args.length > 2) & (args [2] .equals ("all")))
|| ((args. (Length > 3) & (args [3] .equals ("all")));

Boolean test = ((args.length > 2) & (args [2] .equals ("test")))
|| ((args. (Length > 3) & (args [3] .equals ("test")));

If {(test)
System.Err.println ("it's just a test. Nothing will be deleted. ») ;
}
          
If {(filterAll)
System.Err
.println ("this job will remove the accounts disabled everything (including those disabled by an administrator) '. '");
} else {}
System.Err
.println ("will this work only remove users disabled by an authentication source.");
}

calculate for 180 days in the past, based on the current date
Cut of XPDateTime = new XPDateTime();
XPCalendar xpCalendar = XPCalendar.GetInstance ();
xpCalendar.Add (XPCalendar.HOUR,-(24 * numDays));
Break = xpCalendar.GetTime (); subtract from 180 days from now

System.Err
.println ("this work will remove before disabled user accounts:")
+ cutOff.toString ());

request for disabled user accounts
UserManager IPTUserManager = session (IPTUserManager). GetUsers();
          
Result = userManager.GetLockedAccounts (filterAll IPTQueryResult? FILTER_ALL
(: FILTER_AGENT, 0, -1);
ASQueryResultWrapper ptqrUserLock = new ASQueryResultWrapper (result);

for (int i = 0; i)< result.rowcount();="" i++)="">

get some basic user information
userId int = result. ItemAsInt i, PT_PROPIDS.PT_PROPID_OBJECTID;
String name = result. ItemAsString i, PT_PROPIDS.PT_PROPID_NAME;
Connection string = result. ItemAsString i, PT_PROPIDS.PT_PROPID_USER_LOGINNAME;
XPDateTime dt = result. ItemAsXPDateTime i, PT_PROPIDS.PT_PROPID_CREATED;

System.Err.println ("found account: (" + userId + ")" + connection)
//                         + ", " + name);

Check to see if we need to remove the user
If (dt. {Before (cutOff))}

If (! test) {/ / if the test, we only want to see that would have demolished us}
We try to unlock user b/c of a bug in
Automation
Server
The user IPTUser = (IPTUser) ((IPTObjectManager) userManager)
. Open (userId, false);
try {}
user. SetLockedStatus (false);
user. Store();
} catch (Exception ex) {}
We expect that it will fail b/c of a bug
}

Make sure that the account is unlocked
If (by the user. GetLockState() is PT_LOCKSTATES.PT_LOCKED)
user. UnlockObject();
                         
Okay, now we can delete the user
((IPTObjectManager) userManager). Delete (UserID);
}

System.Err.println ("deleted the user account:" + userId + "-" + login + "-" + name);
}

}
}

}

Tags: Fusion Middleware

Similar Questions

  • Request to retrieve the list of users who do not have an updated resource service

    I try to get the list of users who are not a particular resource put into service. I can't seem to find a table that links the object resource information and user information. I need to generate a CSV file. No matter who's done this before, or have any ideas. If so, any information would be very useful.

    Thank you

    Select * usr where usr.usr_key not in)
    Select usr.usr_key from usr, obi, obj, Ouedraogo, ost
    where oiu.usr_key = usr.usr_key
    and oiu.obi_key = obi.obi_key
    and obi.obj_key = obj.obj_key
    and obj.obj_name =: obj_name
    and oiu.ost_key = ost.ost_key
    and ost.ost_status not in ('revoked'))

    -Kevin

  • When I reboot after installation of service pack 2, the message comes out and says that updates are not configured correctly, returning from changes

    When I reboot after installation of service pack 2 on a computer laptop with Windows Vista Home Premium 32-bit Dell XPS M1530, the message comes out and says that updates are not configured correctly, returning from changes. Do not turn off your computer. I installed update readiness tool, but it does still every time. I tried to disable the antivirus software prior to installation.

    Hello
     
     
     
    1. how you try to install Service Pack 2?
    2. are you able to boot to the desktop?
     
     
    Method:
    Step 1: If you are able to start the computer in normal mode, then try a clean boot.

    To help resolve the error and other messages, you can start Windows Vista or Windows 7 by using a minimal set of drivers and startup programs. This type of boot is known as a "clean boot". A clean boot helps eliminate software conflicts.

    How to troubleshoot a problem by performing a clean boot in Windows Vista or in Windows 7

    http://support.Microsoft.com/kb/929135
    Please note: after troubleshooting, start the computer in normal mode.

     
    Step 2: Try to install Service Pack 2 manually.
     
    How to obtain the latest Windows Vista service pack

     
     
    If you are unable to start the computer, then you can follow this link to start the computer in safe mode.
    Start your computer in safe mode
    http://Windows.Microsoft.com/en-us/Windows-Vista/start-your-computer-in-safe-mode
     
     
     
     
    If you are unable to install Service pack 2, you can consult this article.
    Error: Failed to setup of the Windows updates. Restoration of the changes. Do not turn off your computer when you try to install Windows updates
    http://support.Microsoft.com/kb/949358
    Please note: method 2 refers about upgrade on site.  Perform a repair installation/place will not damage files and applications that are currently installed on your computer.   However, I suggest you to back up all important data on the computer before you perform the upgrade on the spot.
     
     
     
     
     
     
     
  • [The content source &#60; iehistory: a bunch of #s] are not accessible.

    Hello:

    I get a bunch of them in the observer of events as warnings.  Not sure if I have problems because of them or not.  Everything seems to work OK for me.

    Here is a list:

    #1:

    The content source are not accessible.

    Background: Windows Application, catalog creates

    Details: (HRESULT: 0x80004005) (0x80004005)

    #2:

    The content source are not accessible.

    Background: Windows Application, catalog creates

    Details: (HRESULT: 0x80004005) (0x80004005)

    #3:

    The content source are not accessible.

    Background: Windows Application, catalog creates

    Details: (HRESULT: 0x80004005) (0x80004005)

    #4:

    The content source are not accessible.

    Background: Windows Application, catalog creates

    Details: The object was not found. (HRESULT: 0 X 80041201) (0 x 80041201)

    #5:

    The content source are not accessible.

    Background: Windows Application, catalog creates

    Details: (HRESULT: 0x80004005) (0x80004005)

    #6:

    The content source are not accessible.

    Background: Windows Application, catalog creates

    Details: (HRESULT: 0x80004005) (0x80004005)

    Some of the above are repeated 3-4 times. I noticed that the changes from 1000 to 500 in some of them.

    When you first start, these error messages appear.  Not sure whether or not they are part of the problem.

    #1

    The gatherer is unable to read the registry URL.

    Context: Application, catalog creates

    Details: (HRESULT: 0 x 0) (0x00000000)

    #2

    The search service has detected data files corrupted in the index {id = 431}. The service tries to automatically correct this problem by rebuilding the index.

    Details:

    The content index catalog is corrupted. (HRESULT: 0XC0041801) (0xc0041801)

    #3

    The Windows Search Service is stopped because there is a problem with the indexer: the catalog is corrupted.

    Details:

    The content index catalog is corrupted. (HRESULT: 0XC0041801) (0xc0041801)

    It was then rebuilt:

    Windows Windows (3524): the database engine has successfully completed recovery steps.

    Any ideas what to do?  Or is it quite 'normal' during boot?

    Thank you, Rick

    Hello

    Are you facing any problems when working with programs?

    Note:

    The event logs that you have posted here refer to errors with the search Index in your computer. These are not fatal errors. However, they certainly point to the fact that some of the sites indexed on your computer are not accessible for the mechanism of research due to various errors. These errors should disappear once you have performed the following steps.

    Method 1:

    You can run the fixit from following link and check the issue:

    Difficulty of Windows Desktop Search when it hangs or no display of results

    http://support.Microsoft.com/mats/windows_search/

    Method 2:

    You can try to rebuild the index to see if it works:

    Change advanced indexing options

    http://Windows.Microsoft.com/en-us/Windows7/change-advanced-indexing-options

    Let us know if it helps!

  • How can I use the "fnd_user_pkg.updateuser" package to disable users in bulk?

    Hello

    How can I use the "fnd_user_pkg.updateuser" package to disable users in bulk?

    in EBS R12.1.3, oracle 11g.

    Please see the request for information of the user

    -------------------------------------------------------------------------------------

    SELECT

    SEPARATE

    FU. USER_NAME

    FULL_NAME EMPLOYEE_NAME

    , TO_DATE (LAST_LOGON_DATE, "dd/mm/rrrr") LAST_LOGON_DATE, end_date, FU.start_date

    OF FND_USER FU, PER_ALL_PEOPLE_F PERX

    WHERE 1 = 1

    AND PERX. PERSON_ID = FU. EMPLOYEE_ID

    AND SYSDATE BETWEEN PERX. EFFECTIVE_START_DATE AND PERX. EFFECTIVE_END_DATE

    AND PERSON_TYPE_ID! = 1118 - excluded candidates iRec

    AND LAST_LOGON_DATE < = TO_DATE (December 31, 2012 ', "dd/mm/rrrr") and end_date is null

    ORDER BY TO_DATE (LAST_LOGON_DATE, "dd/mm/rrrr") / / desc

    ------------------------------------------------------------------------------------

    Concerning

    Ngoyi

    Hello

    You need to do the opposite of what the code in the discussion below is:

    fnd_user_pkg. UpdateUser - End Date remove users

    Kind regards

    Bashar

  • On my iPod Nano 7th generation, there are some artists who are not listed, although their songs are on the iPod. For example, I have two Blue Oyster Cult songs on the iPod and they show, but Blue Oyster Cult is not listed under "artists".

    On my iPod nano, 7th generation, there are artists who are not in the list of "artists". For example, I have two Blue Oyster Cult songs appearing under "Songs", but Blue Oyster Cult is not indicated under "artists". Is it possible to have the COB and other artists who do not appear to show up under the "artists"?

    See Missing artist or Album not with others by the same artist.

    TT2

  • If I created my iPad to the text can I communicate with someone who is not an apple product?  If yes where can I start the process?

    If I created my iPad to the text can I communicate with someone who is not an Apple product?  If so, where should I start this process. She is studying how to set up his tablet to the text for me. Is this possible?  Explicit detail please... I am new to this. Thank you.

    To be able to not text on an iPad Apple devices, you need an associated iPhone to the Apple ID, the iPad is using.

    Read the following support document SMS since it deals with sending SMS through continuity.

    Continuity allows you to connect your iPhone, iPad, iPod touch and Mac - Apple Support

    With continuity, all SMS and MMS text messages that you send and receive on your iPhone may also appear on your Mac, iPad, and iPod touch. You can also meet your contacts from any device is closer to you, including your iPad or Mac.

  • How can I stop the transfer of emails for those who are not selected

    I don't know if my hotmail works properly... cause it sends e-mails to people who are not selected for?

    Mary

    Hello

    As you use Hotmail and Hotmail-related question you have posted. I suggest that you post you query on the Hotmail forum for assistance:

    http://windowslivehelp.com/product.aspx?ProductID=1

  • What I do when I get this message: there is not enough space left to the location of the cache... Thumbnails and previews are not generated or updated in cache on the disk.  Please leave bridge and add more disk space on the volume of the cache or change

    I don't know what that means:

    "There is not enough disk space to left to the location of the cache...  Thumbnails and previews are not generated or updated in cache on the disk.  Please leave bridge and add more disk space on the volume of the cache or change the location of the cache in the Cache preferences.  Then restart Bridge. »

    I deleted a whole bunch of photoshoots I had on my desktop, but how to make more space here?

    Erica

    Hi Ericacole

    What version of the bridge are you using and what is your OS?

    Please how much is left in your main hard drive.

    By default, the bridge cache is located at: -.

    C:\Users\Yourname\AppData\Roaming\Adobe\Bridge CC\Cache (AppData is a hidden folder)

    Note that cache bridge could be very large depending on your use of the product.

    Please see Troubleshooting of errors, freezes | Adobe Bridge | Windows, Mac OS

    Concerning

    Assani

  • Fortunately, I have download my Canon 7 d CR2 files using Photoshop elements 11; but when I do the same thing with a Canon G7X files are not recognized.  I downloaded the latest update of Adobe for RAW files.  Advice gratefully received.

    Fortunately, I have download my Canon 7 d CR2 files using Photoshop elements 11; but when I do the same thing with a Canon G7X files are not recognized.  I downloaded the latest update of Adobe for RAW files.  Advice gratefully received.

    You need Adobe raw camera 8.7 version. Unfortunately your software is earlier than the camera. ACR 8.7 is only compatible with PSE13. But it is possible to download and install the free DNG Converter to convert your raw files to the universal Raw format files and Adobe will be open in all versions of PSE (keep your originals as backups and for use in the software of the camera factory)

    Download Windows (.exe file) click here DNG Converter 8.7

    Download Mac (.dmg file) click here DNG Converter 8.7

    You can convert an entire folder of images raw with a single click. See this quick video tutorial:

    You Tube click here for the DNG Converter tutorial

  • What is the process to remove or change user profiles in windows xp sp3?

    Let me know, what is the procedure to change or remove the user account in windows xp service pack 3?

    Hi varun,

    Click Start--->Panel---> user accounts---> click to change the account that you want to 'Edit' or 'delete '. You must be a user with administrative rights to perform this task.

    Note: If you are not already in "Classic view", you can do it in the left panel.

    Good luck.

  • I use a lot my daily life of the computer. I hear CLICKING noises that are not caused by me! Who and where are the clicks noises coming from? Is there a ROOTKIT, someone somewhere romoting access my internet service?

    Is there a Rootkit, or someone somewhere romoting access my internet service?  I use my computer for several hours every day.

    This year I went through a CRASH my system in September due to my memory stick in my digital camera INFECT my computer.  I bought a new computer that's how it was.  I'm also a MODEL all CIS although I am learning.  Since then, I've downloaded the AMOUNTS of VIRUS protection.  Of course, I didn't know it was my stick of memory from my digital camera which has infected my computer, I only understood what a month ago.  So, you guessed it, even my brand new computer became infected soon enough.  I recently did a RESTORE on it, which has erased everything.

    My point is, I had about 4 people from remote access my computer to try to resolve the various problems with it several times last year.  These people are found in various places: Argentina, India, Phillippians.  I found it interesting.  Whenever they take control of my computer from their remote location.  Once the session is completed, they finished their access.

    Why what I hear clicking then I use my computer?  As I wrote this, I heard it about five times.  What is it?  Why gives me the feeling that someone is using my internet.  Talk about paranoia, makes me think that they can get in my email when I look at my bank account etc.  Is there a possibility that this actually happens or not?

    My son has a laptop that he uses a lot with the internet service that I use.  His laptop using WI - FI.  It uses the X - Box live wi - fi.  These things are going at the same time while I use my internet connection.  Would this be causing clicks?  I would like to know if there is violation of privacy occurring and/or and "OUT OF BOUNDS" type of question, where someone from a remote location using my Comcast service internet and maybe even can see confidential things on my personal login.

    Thank you, WG

    I used my mouse that you asked and he makes no noise whatsoever (it's a laser wireless mouse) - well it makes a rattling noise when I click with the right button or left mouse on an icon as it should, but nothing outstanding at all - is the click made by the mouse when you click on an icon or a hyperlink that you speak?  And you say he doesn't mouse, but from somewhere inside the computer?

    Someone smart enough to gain access to your system to be able to do the things you're afraid of that happening is smart enough to make sure that the computer does not have a noise when it occurs to give the fact that it happens.  In addition, access would be through the network connection so let's do a test.  Remove the connection from the system (I mean disconnect the cable or ethernet connection or remove the wireless card or go to network connections and sharing and disable every single network, you will find (don'tdelete - just disable their) or better yet, just remove the connection of the moden provided by the ISP, so there is NO WAY) a connection could get through.  Then see if clicks continues.  If so, it has antyhing to come with your internet connection or a pirate in your accounts. If it does not go far, it is possible that some network devices is originally of the problem (or that you are currently connected to a web site that generates the rattling noise, but I seriously doubt that this is a sign that everybody won that kind of access to your system (even if it could be malware as I mentioned earlier).

    I honestly have no clue what inside the computer could cause this noise that often and that constantly. It is not a problem of software for me.  I still think you should try the suggestions I made in my previous post (especially the search for malware and do a clean boot).

    If you this concerned and you have tried everything that has been recommended, I stick a reputable computer repair shop and ask them to check it out. If it occurs when they use the computer, they should be able to find the source even if they remove all to do.

    I hope this helps.

    Good luck!

    Lorien - MCSA/MCSE/network + / has + - if this post solves your problem, please click the 'Mark as answer' or 'Useful' button at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • Unable to get the administrator account, receive the error such as the user profile service failed logon. User profile could not be loaded. "

    Original title: "the user profile service has no logon. User profile could not be loaded"and admin password will not work

    I had this problem came several times before but it always correct itself without any intervention from myself. Now, even after restarting the computer several times I can not directly connect to my main Administrator profile. I have another profile without administrative privileges already done so I could at least use my computer, but only with limited permissions. When I try to do something to solve the problem, as the registry change, I'm prompted to enter the administrator password. I enter the password and the alert box goes, and nothing happens. Enter the password seems doing nothing, except the aknowledge the password is correct (it warns me when I entered a wrong password so I know it's no doubt receiving data). DOoes anyone know how to fix this? The computer works relatively well recently and have no idea of what decoration could have happened to cause such a mistake that bothers.

    Hello

    This worked for me, try allowing the default Administrator account, the steps are in the following link
    I hope this will help!
  • Data control for the Web Service based filter table adf only appear not

    I have a SOAP web service I'm consumption as a web service data control.

    When I use one of the results of the web service through data to the web service in the form of a table control in the user interface with the filter and sort, I don't see the filters on the top of the table.

    It comes to JDeveloper version 11.1.1.7.

    Please let me know if anyone has an idea on this issue.

    TIA

    ABS

    You need connect your own logic on the filtering table.

    The table doesn't actually do the filter - it does, is the data control to filter the info - for a Web service we do not know how it will actually make a sort-, so you'll need to add a filterListener on the table and call a WS that will be returned the filtered data method.

  • I want to remove the names of registered users who are wrong and in some cases include the pword... alterations.

    Among the usernames being saved are errors... so when you enter the username box, I get a "list" of names of users. A couple username + password because apparently has not seen that the tab key did not move the slider and it was just marked on the user name. I wish I could delete or reset the user names. Questions from the forum deal with saved password, but I did not save any of my passwords and user names are automatic, unless I disable history research and form "Save". Any suggestions?

    Follow these steps to delete the recorded data (form) in a drop-down list:

    1. Click on the (empty) input field on the web page to open the drop-down list
    2. Select an entry in the drop-down list with the mouse or the cursor key
      do not click with the mouse or press the Enter key
    3. Press the DELETE key (on a Mac: shift + del) to delete the highlighted entry

    You can also check the Manager mot de passe for registered user names and passwords.

Maybe you are looking for