Skip to content

Numeric sAMAccountName #55

@jkms

Description

@jkms

My problem is that all of my AD users account names are numeric. When I attempt to login using sAMAccountName, I get a SynapseError: 400 - Numeric user IDs are reserved for guest users message in the logs.

Changing my user accounts isn't a possibility. I was able to login when I changed the uid property to mailNickname, but it will be difficult/impossible to train my users to login with that property when they are so used to logging in with sAMAccountName.

Is it possible to prepend a string the uid?

What I mean is, a user logs into the homeserver with

  • username: ######
  • Password: Password

ldap3 looks up #####, and verifies the password, and then logs them in as @user_#####:matrix.example.com?

Or, maybe there's a better solution?

password_providers:
 - module: "ldap_auth_provider.LdapAuthProvider"
   config:
     enabled: true
     uri: "ldap://ldap.example.com:389"
     start_tls: true
     base: "OU=ou,DC=example,DC=com"
     attributes:
        uid: "sAMAccountName"
        mail: "mail"
        name: "cn"
     bind_dn: "CN=bind,DC=example,DC=com"
     bind_password: "bindpassword"

Thanks,
--John

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions