Εγκατάσταση SAMBA+LDAP Παραμέτροι

E-mail Εκτύπωση PDF
Αξιολόγηση Χρήστη: / 0
ΧείριστοΆριστο 

Παρακάτω παρουσιάζονται οι παραμέτροι(parameters) της υπηρεσίας LDAP

Η παράμετρος:

loglevel <integer>

χρησιμοποιείται για να κάνουμε debugging και παίρνει τις κάτωθι τιμές (πίνακας 1).

Πίνακας 1: Debugging Levels

Num

Περιγραφή:

-1

enable all debugging

0

no debugging

1

trace function calls

2

debug packet handling

4

heavy trace debugging

8

connection management

16

print out packets sent and received

32

search filter processing

64

configuration file processing

128

access control list processing

256

stats log connections/operations/results

512

stats log entries sent

1024

print communication with shell backends

2048

print entry parsing debugging

Τα log αποθηκεύονται στο syslog (/var/log/syslog, LOG_LOCAL4 facility) και για να τα απομονώσω σε ξεχωριστό αρχείο (ldaplogs), αρκεί να τοποθετήσω στο /etc/syslog.conf τo εξής:

local4.* /var/log/ldaplogs

 

Η παράμετρος referral καθορίζει έναν δεύτερο ldap εξυπηρετητή που θα χρησιμοποιηθεί εάν το DN που αναζητώ δεν υπάρχει στη βάση του δικού μου εξυπηρετητή ή δεν έχω κάποια τοπική βάση για να χειριστώ ένα request. Αυτή την παράμετρο δεν θα τη χρησιμοποιήσουμε και θα την έχουμε κλειστή(hash).

#referral ldap://root.openldap.org

Άλλοι παράμετροι είναι οι εξής:

sizelimit 500 (προσδιορίζει το μέγιστο αριθμό εισαγωγών(entries) που μπορεί να επιστρέψει μια αναζήτηση).

timelimit 3600 (προσδιορίζει τον μέγιστο αριθμό δευτερολέπτων που ο εξυπηρετητής θα χρειαστεί για να εξυπηρετήση μια αίτηση. Μετά το χρόνο αυτό θα κάνει timeout).

 

H πρόσβαση στα entries και τα attributes του LDAP καθορίζονται από την εντολή access που τοποθετείται στο τέλος του αρχείου slapd.conf. Η σύνταξή της είναι η εξής:

access to

[by ]

Όπου <what> τα attributes-entries (ένα η πολλά μαζί χωρισμένα με κόμμα) ή με τη χρήση φίλτρου (filter=).

<who>:

Πίνακας 2.2: Access Entity Specifiers

Specifier

Entities

*

All, including anonymous and authenticated users

anonymous

Anonymous (non-authenticated) users

users

Authenticated users

self

User associated with target entry

dn[.]=

Users matching a regular expression

dn.=

Users within scope of a DN The scope can be either base, one, subtree, or children. Where base matches only the entry with provided DN, one matches the entries whose parent is the provided DN, subtree matches all entries in the subtree whose root is the provided DN, and children matches all entries under the DN (but not the entry named by the DN).

 

:

Πίνακας 2.3: Access Levels

Level

Privileges

Description

none

=0

no access

auth

=x

needed to bind

compare

=cx

needed to compare

search

=scx

needed to apply search filters

read

=rscx

needed to read search results

write

=wrscx

needed to modify/rename

Τέλος το control μπορεί να πάρει μια από τις τιμές: stop, continue και break. To access list που πρέπει να γράψουμε για την αρχική ρύθμιση του LDAP εξυπηρετητή είναι το εξής:

# The admin dn has full write access to everything, everyone else

 

# can read everything.

access to *

by dn="cn=admin,dc=myhost,dc=mydomain,dc=gr" write

by self read

 

by * none

# The admin dn has full write access to this base dn.

access to dn.base="dc=myhost,dc=mydomain,dc=gr"

by dn="cn=admin,dc=myhost,dc=mydomain,dc=gr" write

by * none

#Access to all Objeclasses and specific entries read-only by everyone.

access to attrs=objectClass,entry,gecos,homeDirectory,uid,uidNumber,gidNumber,cn,sn,givenname,memberUid

by dn="cn=admin,dc=myhost,dc=mydomain,dc=gr" write

by * read

access to attrs=loginShell

by dn="cn=admin,dc=myhost,dc=mydomain,dc=gr" write

by * none

# users can authenticate and change their password

access to attrs=userPassword,shadowLastChange

by dn="cn=admin,dc=myhost,dc=mydomain,dc=gr" write

by self write

by anonymous auth

by * none

# Some attributes can be writable by users themselves

access to attrs=description,telephoneNumber,roomNumber,homePhone

by dn="cn=admin,dc=myhost,dc=mydomain,dc=gr" write

by self write

by * read

Στη συνέχεια αποθηκεύουμε το αρχείο slapd.conf και εκτελούμε την εντολή slapindex για την δημιουργία των index αρχείων στο /var/lib/ldap, για τα indices που θέσαμε στο slapd.conf:

#slapindex

 

Ο εξυπηρετητής ldap, εκτελείται εξ’ορισμού από το χρήστη openldap και την ομάδα openldap. Οι ρυθμίσεις αυτές βρίσκονται στο αρχείο:

/etc/default/slapd.conf

Επειδή μετά την εκτέλεση της εντολής slapindex τα αρχεία index που δημιουργούνται στον κατάλογο /var/lib/ldap θα δημιουργηθούν με δικαιώματα root, ο χρήστης openldap δεν θα μπορεί να τα ανοίξει και με εκκίνηση του εξυπηρετητή LDAP θα αποτύχει. Καλό είναι να μπείτε στον κατάλογο /var/lib/ldap και να δώσετε το ownership όλων των αρχείων στο χρήστη openldap και στην ομάδα openldap.

Εδώ τελειώνει το αρχικό configuration του slapd.conf. κλείνουμε το αρχείο και επανεκινήσουμε τον LDAP δαίμονα, παρακολουθώντας τo log file /var/log/ldaplogs :

#/etc/init.d/slapd start

#tail –f /var/log/ldaplogs

slapd[1471]: slapd starting

#netstatan

tcp 0 0 127.0.0.1:389 0.0.0.0:* LISTEN

Στη συνέχεια ρυθμίζουμε το αρχείο /etc/ldap/ldap.conf που είναι το αρχείο που χρησιμοποιούν τα ldap-utilities για να κάνουν login στον LDAP εξυπηρετητή. Στο αρχείο αυτό τοποθετώ το base DN , το hostname του LDAP εξυπηρετητή καθώς και την θύρα 389 εξυπηρέτησης. Προσοχή τα δικαιώματα του αρχείου αυτού πρέπει να είναι 444 (word readable).

# This file should be world readable but not world writable.

HOST localhost

PORT 389

BASE dc=myhost,dc=mydomain,dc=gr

URI ldap://localhost ldap://myhost.mydomain.gr:389






Μοιραστείτε αυτό το άρθρο
Reddit! Del.icio.us! Mixx! Free and Open Source Software News Google! Live! Facebook! StumbleUpon! Yahoo! Dig Me Joomla Free PHP

Σχόλια
Προσθήκη νέου Αναζήτηση RSS
Γράψτε σχόλιο
Όνομα:
Email:
 
Τίτλος:
 
Please input the anti-spam code that you can read in the image.
Τελευταία Ενημέρωση ( Σάββατο, 28 Μάρτιος 2009 23:08 )  

Seach By Google

Translate this website :

Επιλογές


Warning: Parameter 1 to modMainMenuHelper::buildXML() expected to be a reference, value given in /home/flakgr/public_html/libraries/joomla/cache/handler/callback.php on line 99

Manuals


Warning: Parameter 1 to modMainMenuHelper::buildXML() expected to be a reference, value given in /home/flakgr/public_html/libraries/joomla/cache/handler/callback.php on line 99

Σε σύνδεση

Έχουμε 38 επισκέπτες συνδεδεμένους

Τελευταία Σχόλια