This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

pnServer configuration creation rule samaccountname

Hello, I'm trying to set up a creation rule for the samaccountname in the pnServer configuration, which deletes all characters after the 8 digit, but I don't really want to succeed. Does somebody has any idea? thanks

Parents
  • Hi Boehma,

    can you provide some more details please? What should the samaccountname be generated from, does it always need to be exactly 8 characters or only up to 8 characters etc.

    P.S. you can also configure the creationrule for the samaccountname in the ARM config under "Change Configuration" -> "Active Directory"

  • Hello 8paul, the samaccountname should be formed from givenname and sn and may have a maximum of 8 characters. In the Active Directory change configuration, I cannot enter any validation or creation rules, only the ones I made in the pnserver configuration apply, but here no regex intervenes in the creation rules. thanks
  • Hi Boehma, 

    while you can not define the creationrules for other attributes in the change config you can for the samAccountname. Regexes also work fine for me:

    in this example i take 0-4 letters from the firstname and 0-4 letters from lastname. if you just want to take whatever combination you can do <regExpr>('.{0,8}',{givenname}{sn})

  • Hello thank you, I already had a CreationRule there,
    but had overlooked that it is also there for the samaccountname. Sometimes you don't see the needle in the haystack and look in the wrong place. Thanks again for the hint. I have now implemented it as follows <subst> (<regExpr> ('. {0,6}', <toLowerCase> ({sn}))) <subst> (<regExpr> ('^ (? <this>. { 2}) ', <toLowerCase> ({givenname})))
    
    thanks
Reply
  • Hello thank you, I already had a CreationRule there,
    but had overlooked that it is also there for the samaccountname. Sometimes you don't see the needle in the haystack and look in the wrong place. Thanks again for the hint. I have now implemented it as follows <subst> (<regExpr> ('. {0,6}', <toLowerCase> ({sn}))) <subst> (<regExpr> ('^ (? <this>. { 2}) ', <toLowerCase> ({givenname})))
    
    thanks
Children
No Data