From e15c309e717e35a3c88111381b37880dc9dc1e10 Mon Sep 17 00:00:00 2001 From: fram3d Date: Mon, 8 Apr 2024 00:26:13 +0200 Subject: [PATCH] add README --- README.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..0c328f0 --- /dev/null +++ b/README.md @@ -0,0 +1,30 @@ +# LGit (pronounced "legit") + +python library that allows to use LDAP user database, based on luser project with git-like functions + +Examples: + +Following script copies changes made on 192.168.1.13 LDAP server to the 192.168.1.21 server + +``` +import lgit + +server1 = lgit.ldapserver("192.168.1.13", "cn=admin,dc=example,dc=com", "adminpass", "ou=Users,dc=example,dc=com") +server2 = lgit.ldapserver("192.168.1.21", "ou=bob,ou=Users,dc=example,dc=com", "pasSw0rd", "ou=Users,dc=example,dc=com") + +server1.pull(server2) + +``` + +Following script pulls all user changes from both servers to each other + +``` +import lgit + +server1 = lgit.ldapserver("192.168.1.13", "cn=admin,dc=example,dc=com", "adminpass", "ou=Users,dc=example,dc=com") +server2 = lgit.ldapserver("192.168.1.21", "ou=bob,ou=Users,dc=example,dc=com", "pasSw0rd", "ou=Users,dc=example,dc=com") + +lg = lgit.lgit() +lg.sync() + +```