1
0
mirror of https://github.com/kakwa/ldapcherry synced 2024-11-22 09:24:21 +01:00

better configuration example

This commit is contained in:
kakwa 2015-06-28 11:41:36 +02:00
parent e7053435e3
commit 858414e219
3 changed files with 54 additions and 58 deletions

View File

@ -2,7 +2,6 @@ cn:
description: "First Name and Display Name" description: "First Name and Display Name"
display_name: "Display Name" display_name: "Display Name"
type: string type: string
search_displayed: True
weight: 30 weight: 30
autofill: autofill:
function: cn function: cn
@ -11,8 +10,7 @@ cn:
- $name - $name
backends: backends:
ldap: cn ldap: cn
ad: CN # ad: CN
first-name: first-name:
description: "First name of the user" description: "First name of the user"
display_name: "First Name" display_name: "First Name"
@ -21,7 +19,7 @@ first-name:
weight: 20 weight: 20
backends: backends:
ldap: givenName ldap: givenName
ad: givenName # ad: givenName
name: name:
description: "Family name of the user" description: "Family name of the user"
display_name: "Name" display_name: "Name"
@ -30,10 +28,11 @@ name:
type: string type: string
backends: backends:
ldap: sn ldap: sn
ad: sn # ad: sn
email: email:
description: "Email of the user" description: "Email of the user"
display_name: "Email" display_name: "Email"
search_displayed: True
type: email type: email
weight: 40 weight: 40
autofill: autofill:
@ -43,8 +42,8 @@ email:
- $last-name - $last-name
- '@example.com' - '@example.com'
backends: backends:
ldap: email ldap: mail
ad: EMAIL # ad: mail
uid: uid:
description: "UID of the user" description: "UID of the user"
display_name: "UID" display_name: "UID"
@ -59,7 +58,7 @@ uid:
- $last-name - $last-name
backends: backends:
ldap: uid ldap: uid
ad: UID # ad: uid
uidNumber: uidNumber:
description: "User ID Number of the user" description: "User ID Number of the user"
display_name: "UID Number" display_name: "UID Number"
@ -72,7 +71,7 @@ uidNumber:
- $last-name - $last-name
backends: backends:
ldap: uidNumber ldap: uidNumber
ad: UIDNumber # ad: UIDNumber
gidNumber: gidNumber:
description: "Group ID Number of the user" description: "Group ID Number of the user"
display_name: "GID Number" display_name: "GID Number"
@ -81,7 +80,7 @@ gidNumber:
default: 10000 default: 10000
backends: backends:
ldap: gidNumber ldap: gidNumber
ad: GIDNumber # ad: GIDNumber
shell: shell:
description: "Shell of the user" description: "Shell of the user"
display_name: "Shell" display_name: "Shell"
@ -93,8 +92,8 @@ shell:
- /bin/zsh - /bin/zsh
- /bin/sh - /bin/sh
backends: backends:
ldap: shell ldap: loginShell
ad: SHELL # ad: LOGINSHEL
home: home:
description: "Home user path" description: "Home user path"
display_name: "Home" display_name: "Home"
@ -107,9 +106,8 @@ home:
- $last-name - $last-name
- /home/ - /home/
backends: backends:
ldap: home ldap: homeDirectory
ad: Home # ad: HOMEDIRECTORY
password: password:
description: "Password of the user" description: "Password of the user"
display_name: "Password" display_name: "Password"
@ -118,12 +116,4 @@ password:
type: password type: password
backends: backends:
ldap: userPassword ldap: userPassword
ad: userPassword # ad: PASSWORD
logscript:
description: "Windows login script"
display_name: "Login script"
weight: 100
type: fix
value: login1.bat
backends:
ad: logonScript

View File

@ -66,47 +66,54 @@ roles.file = '/etc/ldapcherry/roles.yml'
[backends] [backends]
#####################################
# configuration of ldap backend #
#####################################
# name of the module # name of the module
ldap.module = 'ldapcherry.backend.backendLdap' ldap.module = 'ldapcherry.backend.backendLdap'
# uri of the ldap directory # uri of the ldap directory
ldap.uri = 'ldaps://ldap.ldapcherry.org' ldap.uri = 'ldap://ldap.ldapcherry.org'
# ca to use for ssl/tls connexion # ca to use for ssl/tls connexion
ldap.ca = '/etc/dnscherry/TEST-cacert.pem' #ldap.ca = '/etc/dnscherry/TEST-cacert.pem'
# use start tls # use start tls
ldap.starttls = 'off' #ldap.starttls = 'off'
# check server certificate (for tls) # check server certificate (for tls)
ldap.checkcert = 'off' #ldap.checkcert = 'off'
# bind dn to the ldap # bind dn to the ldap
ldap.binddn = 'cn=ldapcherry,dc=example,dc=org' ldap.binddn = 'cn=dnscherry,dc=example,dc=org'
# password of the bind dn # password of the bind dn
ldap.password = 'password' ldap.password = 'password'
# timeout of ldap connexion (in second) # timeout of ldap connexion (in second)
ldap.timeout = 1 ldap.timeout = 1
# groups dn # groups dn
ldap.groupdn = 'ou=groups,dc=example,dc=org' ldap.groupdn = 'ou=group,dc=example,dc=org'
# users dn # users dn
ldap.userdn = 'ou=people,dc=example,dc=org' ldap.userdn = 'ou=people,dc=example,dc=org'
# ldapsearch filter to get a user # ldapsearch filter to get a user
ldap.user_filter_tmpl = '(uid=%(username)s)' ldap.user_filter_tmpl = '(uid=%(username)s)'
# ldapsearch filter to get groups of a user # ldapsearch filter to get groups of a user
ldap.group_filter_tmpl = '(member=%(username)s)' ldap.group_filter_tmpl = '(member=uid=%(username)s,ou=People,dc=example,dc=org)'
# filter to search users # filter to search users
ldap.search_filter_tmpl = '(|(uid=%(searchstring)s*)(sn=%(searchstring)s*))' ldap.search_filter_tmpl = '(|(uid=%(searchstring)s*)(sn=%(searchstring)s*))'
# ldap group attributes and how to fill them # ldap group attributes and how to fill them
ldap.group_attr.uniqMember = "%(dn)s" ldap.group_attr.member = "%(dn)s"
ldap.group_attr.memberUid = "%(uid)s" #ldap.group_attr.memberUid = "%(uid)s"
# object classes of a user entry # object classes of a user entry
ldap.objectclasses = 'top, person, organizationalPerson, user' ldap.objectclasses = 'top, person, posixAccount, inetOrgPerson'
# dn entry attribute for an ldap user # dn entry attribute for an ldap user
ldap.dn_user_attr = 'uid' ldap.dn_user_attr = 'uid'
#####################################
ad.module = 'ldapcherry.backend.backendSamba4' # configuration of ad backend #
ad.auth = 'Administrator' #####################################
ad.password = 'password' #
#ad.module = 'ldapcherry.backend.backendSamba4'
#ad.auth = 'Administrator'
#ad.password = 'password'
# authentification parameters # authentification parameters
[auth] [auth]
@ -128,4 +135,4 @@ templates.dir = '/usr/share/ldapcherry/templates/'
[/static] [/static]
tools.staticdir.on = True tools.staticdir.on = True
tools.staticdir.dir = '/usr/share/ldapcherry/static/' tools.staticdir.dir = '/home/kakwa/Geek/GitHub/ldapcherry/resources/static/'

View File

@ -3,14 +3,14 @@ admin-lv3:
description: Super administrators of the system description: Super administrators of the system
backends_groups: backends_groups:
ldap: ldap:
- cn=dns admins,ou=group,dc=example,dc=com - cn=dns admins,ou=Group,dc=example,dc=org
- cn=nagios admins,ou=group,dc=example,dc=com - cn=nagios admins,ou=Group,dc=example,dc=org
- cn=puppet admins,ou=group,dc=example,dc=com - cn=puppet admins,ou=Group,dc=example,dc=org
- cn=users,ou=group,dc=example,dc=com - cn=users,ou=Group,dc=example,dc=org
ad: # ad:
- Domain Users # - Administrators
- Administrators # - Domain Controllers
- Domain Controllers # - Domain Users
admin-lv2: admin-lv2:
display_name: Administrators Level 2 display_name: Administrators Level 2
@ -18,26 +18,25 @@ admin-lv2:
LC_admins: True LC_admins: True
backends_groups: backends_groups:
ldap: ldap:
- cn=nagios admins,ou=group,dc=example,dc=com - cn=nagios admins,ou=Group,dc=example,dc=org
- cn=users,ou=group,dc=example,dc=com - cn=users,ou=Group,dc=example,dc=org
ad: # ad:
- Domain Users # - Domain Users
# - Domain Controllers
developpers: developpers:
display_name: Developpers display_name: Developpers
description: Developpers of the system description: Developpers of the system
backends_groups: backends_groups:
ldap: ldap:
- cn=developpers,ou=group,dc=example,dc=com - cn=developpers,ou=Group,dc=example,dc=org
- cn=users,ou=group,dc=example,dc=com - cn=users,ou=Group,dc=example,dc=org
ad:
- Domain Users
users: users:
display_name: Simple Users display_name: Simple Users
description: Basic users of the system description: Basic users of the system
backends_groups: backends_groups:
ldap: ldap:
- cn=users,ou=group,dc=example,dc=com - cn=users,ou=Group,dc=example,dc=org
ad: # ad:
- Domain Users # - Domain Users