[Freeipa-users] Cannot enter $ character in "group name" of "user groups"

Alexander Bokovoy abokovoy at redhat.com
Wed Feb 15 12:52:16 UTC 2017


On ke, 15 helmi 2017, Jens Timmerman wrote:
>Hi Martin,
>
>
>On 15/02/2017 12:27, Martin Basti wrote:
>>
>>
>>
>> On 15.02.2017 10:57, Dimitris Beletsiotis wrote:
>>> Hello,
>>>
>>> Despite the documentation that says that we can use $ in "group
>>> names" the web gui does not allow it, pls see attached.
>>> Is there some option to enable this?
>>>
>>> Thanks,
>>> Dimitris Beletsiotis
>>>
>>>
>> Hello,
>>
>> I checked the code and '$' can be used only as the last character in
>> group name, so error message is not quite exact
>>
>> PATTERN_GROUPUSER_NAME = '^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*[a-zA-Z0-9_.$-]?$'
>Since this is a pattern to be matched, the $ actually means something
>(it is an end of string anchor) and is not a literal '$' character.
>see
>http://www.regular-expressions.info/anchors.html
The third set of allowed characters at the end includes $. The set
[a-zA-Z0-9_.$-]? has '?' qualifier which means it is optional. But end
result is to allow '$' as the last character of a group or user name.

However, '$' is not allowed anywhere else. This makes possible to have
machine or trusted domain accounts for Active Directory/Samba purposes
but nothing else with '$' sign in the name.

-- 
/ Alexander Bokovoy




More information about the Freeipa-users mailing list