joeware - never stop exploring... :)

Information about joeware mixed with wild and crazy opinions...

Question about configuring Active Roles Server property validation policies…

by @ 6:45 pm on 6/19/2008. Filed under tech

So I am working on Active Roles Server (ARS for now on…) and ran into a little issue that had me thinking for a little bit…

The thing was that I needed to auto-generate the user name and it needed to be

[LASTNAME],[SPACE][FIRSTNAME][SPACE][INITIALS]

So for example, say I have John Q. Public the name attribute (aka cn for user) needed to be Public, John Q

Now I don’t like this format for the name attribute on objects in AD, I much prefer using something that is unique, say like sAMAccountName. But for some reason, some people like to see the name looking like the displayName. Not sure why, just some people do. So anyway, it doesn’t matter what I think in this case, the standard that I have to follow is as I mentioned

 

Anyway… This is frighteningly easy in ARS. First I defined my rules for givenName, sn, and initials…

givenName = ^[A-Z]([A-Za-z]+[ -]?)+[A-Za-z]{0,1}$

sn = ^[A-Z]([A-Za-z]+[ -‘]?)+[A-Za-z]{0,1}$

initials = ^[A-Za-z]+$

and then via the GUI set the rule for name to autogenerate with

%<sn>, %<givenName> %<initials>

That works perfectly…

 

Right up until someone doesn’t have initials in their name… CRAP!

What happens is that you get

[LASTNAME],[SPACE][FIRSTNAME][SPACE]

and that trailing space is a P.I.T.A..

Does anyone here use ARS? If so, do you know how to handle this situation WITHOUT a script? I mean seriously, you should be able to do this in the basic auto-generation language.

Rating 3.00 out of 5

One Response to “Question about configuring Active Roles Server property validation policies…”

  1. Alun Jones says:

    What do you do for people with only one name?
    Insist they Westernise themselves and include two names, one of which they share with every male ancestor?

[joeware – never stop exploring… :) is proudly powered by WordPress.]