# Changing case with "User\_map\_match"

**URL:** <https://discourse.openondemand.org/t/changing-case-with-user-map-match/3673>\
**Category:** Get Help\
**Created:** [August 3, 2024, 8:44am UTC](https://discourse.openondemand.org/t/changing-case-with-user-map-match/3673 "2024-08-03T08:44:14Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shadowphax](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/shadowphax/32/691_2.png) [@Shadowphax](https://discourse.openondemand.org/u/Shadowphax)\
**Post date:** [August 3, 2024, 8:44am UTC](https://discourse.openondemand.org/t/changing-case-with-user-map-match/3673/1 "2024-08-03T08:44:14Z")

</div>

Hi All,

I am using dex to authenticate to Active Directory(AD). The AD user objects are all upper-case and the Linux system users are created in lower-case and therefore introduces a mapping error between AD and the system users. Therefore, I would like to use the “user\_map\_match” option in ood\_portal to ensure that the correct case is provided when authenticating. We also have alternate AD user objects that are based on numbers only that require authentication. These work fine because they do not require any case changes.

I am not proficient in Lua patterns and the options I’ve tried do not work. Any suggestions how I could get this working?

Cheers

---

<div class="post-metadata">

**Author:** ![Shadowphax](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/shadowphax/32/691_2.png) [@Shadowphax](https://discourse.openondemand.org/u/Shadowphax)\
**Post date:** [August 3, 2024, 9:24am UTC](https://discourse.openondemand.org/t/changing-case-with-user-map-match/3673/2 "2024-08-03T09:24:12Z")

</div>

I’ve noted that there was a move away from the cmd version. I’ve written a script which converts the case but thought it might be beneficial to understand how user\_map\_match would work for this as it’s being promoted versus the cmd version.

Cheers

---

<div class="post-metadata">

**Author:** ![jeff.ohrstrom](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/jeff.ohrstrom/32/136_2.png) [@jeff.ohrstrom](https://discourse.openondemand.org/u/jeff.ohrstrom)\
**Post date:** [August 5, 2024, 1:35pm UTC](https://discourse.openondemand.org/t/changing-case-with-user-map-match/3673/3 "2024-08-05T13:35:51Z")

</div>

> [@Shadowphax](#):
>
> user\_map\_match would work for this as it’s being promoted versus the cmd version.

The cmd version issues a command which has much more overhead than simply calling a function in a programming language. Issuing a command (in this context) requires starting a whole new process which have to make all sorts of system calls.

So in sum, there’s just more overhead with the cmd which can cause latencies.

That said - I’m pretty sure user\_map\_match can only extract a string from another string. I don’t believe it can do transformations like that.

---

<div class="post-metadata">

**Author:** ![Shadowphax](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/shadowphax/32/691_2.png) [@Shadowphax](https://discourse.openondemand.org/u/Shadowphax)\
**Post date:** [August 8, 2024, 3:56pm UTC](https://discourse.openondemand.org/t/changing-case-with-user-map-match/3673/4 "2024-08-08T15:56:24Z")

</div>

Thank you, Jeff. This works for me and allows for much more granular adjustments in future. I have noted your comment on latencies.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/osc/original/2X/b/bae70bd0ed39a3ae769c2108155f4cb3e9da8385.png) [@system](https://discourse.openondemand.org/u/system)\
**Post date:** [February 4, 2025, 3:56pm UTC](https://discourse.openondemand.org/t/changing-case-with-user-map-match/3673/5 "2025-02-04T15:56:49Z")

</div>

Closed on February 4, 2025, 3:56pm UTC

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
