|
|
Line 1: |
Line 1: |
| ==Under Progress==
| |
| Ubuntu 10.04 has a different version of LDAP so if you want to look for a tutorial make sure is 10.04 or because things have changed a lot.
| |
|
| |
|
| Install the needed LDAP server packages and containing management utilities.
| |
| sudo apt-get install slapd ldap-utils
| |
|
| |
|
| |
| The schemas are ....
| |
| In order to load this schemas run the following commands
| |
| sudo ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/cosine.ldif
| |
| sudo ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/nis.ldif
| |
| sudo ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/inetorgperson.ldif
| |
|
| |
| There should be a backend.ldif file within your backups. If for some odd reason this was not backed up then create a an LDIF file
| |
|
| |
| vim backend.ldif
| |
|
| |
| Copy and paste the following template.
| |
|
| |
| <pre>
| |
| #Load dynamic backend modules
| |
| dn: cn=module,cn=config
| |
| objectClass: olcModuleList
| |
| cn: module
| |
| olcModulepath: /usr/lib/ldap
| |
| olcModuleload: back_hdb
| |
|
| |
| # Database settings
| |
| dn: olcDatabase=hdb,cn=config
| |
| objectClass: olcDatabaseConfig
| |
| objectClass: olcHdbConfig
| |
| olcDatabase: {1}hdb
| |
| olcSuffix: dc=cs,dc=wallawalla,dc=edu
| |
| olcDbDirectory: /var/lib/ldap
| |
| olcRootDN: cn=admin,dc=cs,dc=wallawalla,dc=edu
| |
| olcRootPW: {SSHA}sPKiAjzTE9jZ+SpTLocHD6pcm+j5icTm
| |
| olcDbConfig: set_cachesize 0 2097152 0
| |
| olcDbConfig: set_lk_max_objects 1500
| |
| olcDbConfig: set_lk_max_locks 1500
| |
| olcDbConfig: set_lk_max_lockers 1500
| |
| olcDbIndex: objectClass eq
| |
| olcLastMod: TRUE
| |
| olcDbCheckpoint: 512 30
| |
| olcAccess: to attrs=userPassword by dn="cn=admin,dc=cs,dc=wallawalla,dc=edu" write by anonymous auth by self write by * none
| |
| olcAccess: to attrs=shadowLastChange by self write by * read
| |
| olcAccess: to dn.base="" by * read
| |
| olcAccess: to * by dn="cn=admin,dc=cs,dc=wallawalla,dc=edu" write by * read
| |
| </pre>
| |
|
| |
| Load the LIDF file to the directory
| |
|
| |
| sudo ldapadd -Y EXTERNAL -H ldapi:/// -f backend.ldif
| |
|
| |
| Backend.ldif is where users credentials are stored.
| |
|
| |
| <pre>
| |
| # Create top-level object in domain
| |
| dn: dc=cs,dc=wallawalla,dc=edu
| |
| objectClass: top
| |
| objectClass: dcObject
| |
| objectclass: organization
| |
| o: cs
| |
| dc: cs
| |
| description: Walla Walla CS Department
| |
|
| |
| # Admin user.
| |
| dn: cn=admin,dc=cs,dc=wallawalla,dc=edu
| |
| objectClass: simpleSecurityObject
| |
| objectClass: organizationalRole
| |
| cn: admin
| |
| description: LDAP administrator
| |
| userPassword: {SSHA}+FZgcegrOsD4ku0oaRE1XuZePP5IyfQK
| |
|
| |
| dn: ou=people,dc=cs,dc=wallawalla,dc=edu
| |
| objectClass: organizationalUnit
| |
| ou: people
| |
|
| |
| dn: ou=groups,dc=cs,dc=wallawalla,dc=edu
| |
| objectClass: organizationalUnit
| |
| ou: groups
| |
| description: groups branch, houses all the groups
| |
|
| |
| dn: uid=grosda,ou=people,dc=cs,dc=wallawalla,dc=edu
| |
| objectClass: inetOrgPerson
| |
| objectClass: posixAccount
| |
| objectClass: shadowAccount
| |
| uid: grosda
| |
| sn: Gross
| |
| givenName: David
| |
| cn: David Gross
| |
| displayName: David Gross
| |
| uidNumber: 1000
| |
| gidNumber: 10000
| |
| userPassword: {SSHA}sPKiAjzTE9jZ+SpTLocHD6pcm+j5icTm
| |
| gecos: David Gross
| |
| loginShell: /bin/bash
| |
| homeDirectory: /home/grosda
| |
| shadowExpire: -1
| |
| shadowFlag: 0
| |
| shadowWarning: 7
| |
| shadowMin: 8
| |
| shadowMax: 999999
| |
| shadowLastChange: 10877
| |
| mail: david
| |
| dn: dc=cs,dc=wallawalla,dc=edu
| |
| objectClass: top
| |
| objectClass: dcObject
| |
| objectclass: organization
| |
| o: cs
| |
| dc: cs
| |
| description: Walla Walla CS Department
| |
|
| |
| # Admin user.
| |
| dn: cn=admin,dc=cs,dc=wallawalla,dc=edu
| |
| objectClass: simpleSecurityObject
| |
| objectClass: organizationalRole
| |
| cn: admin
| |
| description: LDAP administrator
| |
| userPassword: {SSHA}+FZgcegrOsD4ku0oaRE1XuZePP5IyfQK
| |
|
| |
| dn: ou=people,dc=cs,dc=wallawalla,dc=edu
| |
| objectClass: organizationalUnit
| |
| ou: people
| |
|
| |
| dn: ou=groups,dc=cs,dc=wallawalla,dc=edu
| |
| objectClass: organizationalUnit
| |
| ou: groups
| |
| description: groups branch, houses all the groups
| |
|
| |
| dn: uid=grosda,ou=people,dc=cs,dc=wallawalla,dc=edu
| |
| objectClass: inetOrgPerson
| |
| objectClass: posixAccount
| |
| objectClass: shadowAccount
| |
| uid: grosda
| |
| sn: Gross
| |
| givenName: David
| |
| cn: David Gross
| |
| displayName: David Gross
| |
| uidNumber: 1000
| |
| gidNumber: 10000
| |
| userPassword: {SSHA}sPKiAjzTE9jZ+SpTLocHD6pcm+j5icTm
| |
| gecos: David Gross
| |
| loginShell: /bin/bash
| |
| homeDirectory: /home/grosda
| |
| shadowExpire: -1
| |
| shadowFlag: 0
| |
| shadowWarning: 7
| |
| shadowMin: 8
| |
| shadowMax: 999999
| |
| shadowLastChange: 10mail: david
| |
| dn: dc=cs,dc=wallawalla,dc=edu
| |
| objectClass: top
| |
| objectClass: dcObject
| |
| objectclass: organization
| |
| o: cs
| |
| dc: cs
| |
| description: Walla Walla CS Department
| |
|
| |
| # Admin user.
| |
| dn: cn=admin,dc=cs,dc=wallawalla,dc=edu
| |
| objectClass: simpleSecurityObject
| |
| objectClass: organizationalRole
| |
| cn: admin
| |
| description: LDAP administrator
| |
| userPassword: {SSHA}+FZgcegrOsD4ku0oaRE1XuZePP5IyfQK
| |
|
| |
| dn: ou=people,dc=cs,dc=wallawalla,dc=edu
| |
| objectClass: organizationalUnit
| |
| ou: people
| |
|
| |
| dn: ou=groups,dc=cs,dc=wallawalla,dc=edu
| |
| objectClass: organizationalUnit
| |
| ou: groups
| |
| description: groups branch, houses all the groups
| |
|
| |
| dn: uid=grosda,ou=people,dc=cs,dc=wallawalla,dc=edu
| |
| objectClass: inetOrgPerson
| |
| objectClass: posixAccount
| |
| objectClass: shadowAccount
| |
| uid: grosda
| |
| sn: Gross
| |
| givenName: David
| |
| cn: David Gross
| |
| displayName: David Gross
| |
| uidNumber: 1000
| |
| gidNumber: 10000
| |
| userPassword: {SSHA}sPKiAjzTE9jZ+SpTLocHD6pcm+j5icTm
| |
| gecos: David Gross
| |
| loginShell: /bin/bash
| |
| homeDirectory: /home/grosda
| |
| shadowExpire: -1
| |
| shadowFlag: 0
| |
| shadowWarning: 7
| |
| shadowMin: 8
| |
| shadowMax: 999999
| |
| shadowLastChange: 10877
| |
| mail: david.gross@wallawalla.edu
| |
| postalCode: 31000
| |
| l: Florence
| |
| o: Walla Walla University
| |
| mobile: +33 (0)6 xx xx xx xx
| |
| homePhone: +33 (0)5 xx xx xx xx
| |
| title: System Administrator
| |
| postalAddress:
| |
| initials: DG
| |
|
| |
| dn: cn=users,ou=groups,dc=cs,dc=wallawalla,dc=edu
| |
| objectClass: posixGroup
| |
| cn: users
| |
| gidNumber: 10000
| |
| <pre>
| |