mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
[doc] document updating from ldap
This commit is contained in:
parent
3245124312
commit
6de32894ab
1 changed files with 28 additions and 0 deletions
28
doc/ldap.rst
28
doc/ldap.rst
|
@ -150,3 +150,31 @@ This give us the 2 following python calls:
|
|||
Apparently we could also access one user using the following path (and not query): :file:`uid=user_username,ou=users,dc=yunohost,dc=org` but I haven't test it.
|
||||
|
||||
If you want specific attributes look at the general documentation on how to read from LDAP a bit above of this section.
|
||||
|
||||
Updating LDAP data
|
||||
==================
|
||||
|
||||
Update a user from ldap looks like a simplified version of searching. The syntax is the following one:
|
||||
|
||||
::
|
||||
|
||||
auth.update(exact_path_to_object, {'attribute_to_modify': 'new_value', 'another_attribute_to_modify': 'another_value', ...})
|
||||
|
||||
For example this will update a user :file:`loginShell`:
|
||||
|
||||
::
|
||||
|
||||
auth.update('uid=some_username,ou=users', {'loginShell': '/bin/bash'})
|
||||
|
||||
I don't know how this call behave if it fails and what it returns.
|
||||
|
||||
Updating a user in LDAP
|
||||
-------------------------
|
||||
|
||||
This is done this way:
|
||||
|
||||
::
|
||||
|
||||
auth.update('uid=some_username,ou=users', {'attribute': 'new_value', ...})
|
||||
|
||||
Refer to the user schema to know which attributes you can modify.
|
||||
|
|
Loading…
Reference in a new issue