Group Help - Programmatically Remove Users

Seeing if anyone can help with this issue.

We have many domains that we manage and there are groups that exist in one domain that need to be e-mailed to from another domain. To accomplish this, we created a separate NAB that replicates across all servers and only contains user and group info, no config or server doc’s. Works great.

The problem that I have is that when users leave the company, someone has to manually remove them from every group that they are member’s of. These groups are NOT maintained on the NAB for each domain, they only reside on this shared NAB so the Delete Person process does not remove them. Unfortunately, as you might imagine, our administrators don’t always remove people in a timely fashion so the groups have to be routinely “cleaned up”.

Is there any way to create either an agent or a program that would scour the groups on the NAB we created and then remove the name(s) I specify?

Subject: Group Help - Programmatically Remove Users

Rob…Do-able as long as the separate NAB and the main NAB exist on the same server.

You’d have to decide if you want to alter the separate NAB design, or create an “administration” database that does this for you.

Basically, you’d need a view that selects the group forms in the separate NAB with the first column being sorted on lowercase, MEMBERS. (depending on how you want to do this, you can search via commonname, abbreviated or canonical.)

Your agent would step through the entry categories in the separate NAB, and then search the $USERS view in the Main NAB. If the entry is found in the main NAB, the agent continues to the next category. If not, it steps through the each of the group entry forms and removes the member., i.e. removemember subroutine.

I had a corporate directory that I had to refresh with active people from the NAB, along with cell phone info from another database.

There are a number of ways to approach this, some more robust than others.

Regards,

Marilyn

Subject: RE: Group Help - Programmatically Remove Users

I thought through this and it doesn’t work for our circumstances. Domain A NAB contains only Domain A’s employees, Domain B NAB contains only Domain B’s employees, Domain C,D,E and so on. The shared NAB that we created contains groups from all of these different domains. So if I ran the agent from Domain A it would delete all group members from the other domains, etc…

I appreciate your help though. If anyone has any other ideas I am all ears.

Subject: RE: Group Help - Programmatically Remove Users

Yeah, then each NAB would have to mail it’s current list of users to the admin database that would sit on the shared NAB server.

Still do-able.

Maybe something like this:

You’d need an agent on each NAB that would step through the ($VIMPeople) view, and collect the names from the first column (wonder if you’d ever need the other names?), create a form and mail it into a central database on the shared server.

The shared server database has a form with the field: fullname, and a LookupView with a sorted column: @lowercase(@Name([Abbreviate]; @Subset(Fullname; 1)))

Your shared nab has a lookupview with TWO columns, the first being sorted categorized: @Lowercase(@Name([Abbreviate]; Members)), the second column could be the group title.

EAch NAB runs an agent to mail a single form to the shared database once a week.- you might want to add a single (“done”)

document for each server at the end of the agent… this way you can be sure to ONLY run the comparison when ALL servers have sent in their updates.

The shared database runs a comparative agent against the column one group names, and if it doesn’t find the name in the shared server database, it removes them from the group.

(as a precaution, you could log removed entries to an agent.log)

When it finishes it’s comparison, it deletes all the mailed in documents.

Off hand, I would make sure the shared NAB is not replicating during the update. :slight_smile:

Subject: RE: Group Help - Programmatically Remove Users

The agent could easily check for the current domain and/or organization in the current NAB, and only check person docs and group members that belong to this organization/domain.

That way, the agent could run in all domains, and still only act on the users of the current domain.

/Peter

Subject: Group Help - Programmatically Remove Users

If is an separate NAB, you can create a view filtering the documents with form = “Group” and sorted by the “Members” field (maybe by Common Name or Abbreviated), then create an LS agent that get from user the name(s) to be deleted, then process each one looking up in the view and remove the “undesired” value form list.

Regards,

Oswaldo Escobar Mendoza

Lima, Perú

Subject: RE: Group Help - Programmatically Remove Users

You’ve given me some really good ideas. Thanks. I will not be working on this until after Christmas but I will post and let you know which way I go.

Thanks again