Commit fd280c0b authored by Jakob Moser's avatar Jakob Moser
Browse files

Use user principal name instead

parent 6371b3b5
Loading
Loading
Loading
Loading
+16 −4
Original line number Diff line number Diff line
@@ -103,18 +103,30 @@ dn = f"cn={escape_rdn(user)},ou=accounts,dc=cl,dc=uni-heidelberg,dc=de"

### Uni ID

#### User Principal Name

```python
dn = f"{user}@uni-heidelberg.de"
```

This is not actually a normal LDAP distinguished name, but a format invented by Microsoft which only works with Active Directory™ servers. This “faux DN” format is, as said, not standard; however, it is much easier to use.

- [User Principal Name (Microsoft)](https://learn.microsoft.com/en-us/windows/win32/secauthn/user-name-formats?redirectedfrom=MSDN#user-principal-name)
- [User Principal Name (Wikipedia)](https://de.wikipedia.org/wiki/User_Principal_Name)

#### Proper DN

```python
dn = f"cn={escape_rdn(user)},ou=fnphi,ou=rzuser,dc=ad,dc=uni-heidelberg,dc=de"
```

>>> [!important]
This only works if the student is part of the `ou=fnphi` organization, i.e., a member of the Neuphilologische Fakultät. This does not generalize, so we recommend using the User Principal Name instead.

This only works if the student is part of the `ou=fnphi` organization, i.e., a member of the Neuphilologische Fakultät. This does not generalize. Until I've figured out a better way, I discourage using the Uni LDAP server.
>>>
Alternatively, you could also try to first bind to the server using a service account (or your personal Uni ID, search for the entered Uni ID and then determine the DN that way).

>>> [!tip]

If in your scenario, it is acceptable to manually determine a users distinguished name, you can connect to the URZ Windows Terminal Server and follow the guide below (both pages are in German):
If you are okay with manually determining a users distinguished name, you can connect to the URZ Windows Terminal Server and follow the guide below (both pages are in German):

- [Windows Terminalserver](https://www.urz.uni-heidelberg.de/de/service-katalog/desktop-und-arbeitsplatz/windows-terminalserver)
- [Distinguished Name (DN) oder vollständigen Active Directory Pfad abfragen](https://www.windows-faq.de/2020/07/30/distinguished-name-dn-oder-vollstaendigen-active-directory-pfad-abfragen/)