Nieuws:

Welkom, Gast. Alsjeblieft inloggen of registreren.
Heb je de activerings-mail niet ontvangen?

Auteur Topic: OpenLDAP configuratie, en mijn server is een geest?  (gelezen 3361 keer)

OpenLDAP configuratie, en mijn server is een geest?
« Gepost op: 2011/03/28, 14:25:48 »
Ik ben hard bezig geweest om een Active Directory-achtig systeem (OpenLDAP) in een van mijn servers te flikkeren.
Ik loop vast bij de volgende configuratie:
dn: cn=module,cn=config
objectClass: olcModuleList
cn: module
olcModulepath: /usr/lib/ldap
olcModuleload: back_hdb
dn: olcDatabase=hdb,cn=config
objectClass: olcDatabaseConfig
objectClass: olcHdbConfig
olcDatabase: {1}hdb
olcSuffix: dc=pdc
olcDbDirectory: /var/lib/ldap
olcRootDN: cn=admin,dc=pdc
olcRootPW: PASSWD
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=pdc" 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=pdc" write by * read
Vervolgens configureer ik het in Webmin:
Failed to save LDAP server configuration : No LDIF-format config file found for olcDatabase={1}hdb,cn=configDan doe ik het in SSH:
root@vps:~# ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/backend.cw-server.us.ldif
SASL/EXTERNAL authentication started
SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth
SASL SSF: 0
ldapadd: attributeDescription "dn": (possible missing newline after line 7, entry "cn=module,cn=config"?)
adding new entry "cn=module,cn=config"
ldap_add: Invalid syntax (21)
additional info: objectClass: value #2 invalid per syntax

root@vps:~#

En vervolgens kom ik op een ander probleem: Mijn server is een geest?
root@vps:/etc/ldap/schema# ls /
aquota.group  aquota.user  bin  boot  dev  etc  fastboot  home  lib  media  mnt  opt  proc  root  sbin  selinux  srv  sys  tmp  usr  var  webmin-setup.out
root@vps:/etc/ldap/schema# whereis sda
sda:
root@vps:/etc/ldap/schema# whereis sdb
sdb:
root@vps:/etc/ldap/schema# whereis hda
hda:
root@vps:/etc/ldap/schema# whereis hdb
hdb:
root@vps:/etc/ldap/schema# fdisk -l
cannot open /proc/partitions
root@vps:/etc/ldap/schema# dmesg | more
root@vps:/etc/ldap/schema# ls /dev
agpgart  audioctl  dsp2  log    loop4  midi0   midi1   mixer2      port   ptyp2  ptyp7  ptypc  ram0   ram13  ram3  ram8    rmidi2     smpte0   stderr  tty1  tty6   ttyp1  ttyp6  ttypb  urandom
audio    console   dsp3  loop0  loop5  midi00  midi2   mixer3      ptmx   ptyp3  ptyp8  ptypd  ram1   ram14  ram4  ram9    rmidi3     smpte1   stdin   tty2  tty7   ttyp2  ttyp7  ttypc  xconsole
audio1   core      fd    loop1  loop6  midi01  midi3   mpu401data  pts    ptyp4  ptyp9  ptype  ram10  ram15  ram5  random  sequencer  smpte2   stdout  tty3  tty8   ttyp3  ttyp8  ttypd  zero
audio2   dsp       full  loop2  loop7  midi02  mixer   mpu401stat  ptyp0  ptyp5  ptypa  ptypf  ram11  ram16  ram6  rmidi0  shm        smpte3   tty     tty4  tty9   ttyp4  ttyp9  ttype
audio3   dsp1      kmem  loop3  mem    midi03  mixer1  null        ptyp1  ptyp6  ptypb  ram    ram12  ram2   ram7  rmidi1  simfs      sndstat  tty0    tty5  ttyp0  ttyp5  ttypa  ttypf
root@vps:/etc/ldap/schema#

Ik draai overigens op Ubuntu Server 10.04.2 LTS, server staat bij QuickWeb, in Pheonix, USA.

Re: OpenLDAP configuratie, en mijn server is een geest?
« Reactie #1 Gepost op: 2011/03/29, 10:29:31 »
Ik heb mezelf overgehaald om alles via Webmin te doen.
Op een gegeven moment is alles gelukt, maar ik loop nog steeds vast op het toevoegen van een gebruiker:
Failed to save user : Failed to add user to LDAP database : objectClass: value #3 invalid per syntax

Ook als ik een groep wil toevoegen:
Failed to save group : Failed to add group to LDAP database : objectClass: value #1 invalid per syntax

Re: OpenLDAP configuratie, en mijn server is een geest?
« Reactie #2 Gepost op: 2011/03/30, 08:05:39 »
Ik heb de instructies op de Webmin site doorgelezen, en krijg deze melding nu:
Failed to bind to LDAP server as cn=Manager,dc=cw-server,dc=us : Invalid credentials.

Re: OpenLDAP configuratie, en mijn server is een geest?
« Reactie #3 Gepost op: 2011/03/30, 11:22:36 »
De fout van post 3 is inmiddels al opgelost, en ben dus teruggekomen bij de fout van post 2.

Re: OpenLDAP configuratie, en mijn server is een geest?
« Reactie #4 Gepost op: 2011/03/31, 09:29:07 »
Ik heb mijn server helemaal opnieuw ingericht, en dit keer met Debian, en in de Command Line, in plaats van Webmin.
Nu is alles gelukt, maar ik kan nog geen Windows machines aan het domein toevoegen, en onder Ubuntu weet ik niet hoe.

Re: OpenLDAP configuratie, en mijn server is een geest?
« Reactie #5 Gepost op: 2011/03/31, 11:55:26 »
Toen was ik in Samba aan het kloten:
root@cw-server:~# smbldap-populate
Populating LDAP directory for domain 184.171.160.107 (S-1-5-21-3394989656-3404352925-1997132750)
(using builtin directory structure)

entry dc=cw-server,dc=us already exist.
entry ou=Users,dc=cw-server,dc=us already exist.
entry ou=Groups,dc=cw-server,dc=us already exist.
entry ou=Computers,dc=cw-server,dc=us already exist.
entry ou=Idmap,dc=cw-server,dc=us already exist.
adding new entry: uid=root,ou=Users,dc=cw-server,dc=us
failed to add entry: objectClass: value #4 invalid per syntax at /usr/sbin/smbldap-populate line 499, <GEN1> line 58.
adding new entry: uid=nobody,ou=Users,dc=cw-server,dc=us
failed to add entry: objectClass: value #4 invalid per syntax at /usr/sbin/smbldap-populate line 499, <GEN1> line 89.
adding new entry: cn=Domain Admins,ou=Groups,dc=cw-server,dc=us
failed to add entry: objectClass: value #2 invalid per syntax at /usr/sbin/smbldap-populate line 499, <GEN1> line 101.
adding new entry: cn=Domain Users,ou=Groups,dc=cw-server,dc=us
failed to add entry: objectClass: value #2 invalid per syntax at /usr/sbin/smbldap-populate line 499, <GEN1> line 112.
adding new entry: cn=Domain Guests,ou=Groups,dc=cw-server,dc=us
failed to add entry: objectClass: value #2 invalid per syntax at /usr/sbin/smbldap-populate line 499, <GEN1> line 123.
adding new entry: cn=Domain Computers,ou=Groups,dc=cw-server,dc=us
failed to add entry: objectClass: value #2 invalid per syntax at /usr/sbin/smbldap-populate line 499, <GEN1> line 134.
adding new entry: cn=Administrators,ou=Groups,dc=cw-server,dc=us
failed to add entry: objectClass: value #2 invalid per syntax at /usr/sbin/smbldap-populate line 499, <GEN1> line 179.
adding new entry: cn=Account Operators,ou=Groups,dc=cw-server,dc=us
failed to add entry: objectClass: value #2 invalid per syntax at /usr/sbin/smbldap-populate line 499, <GEN1> line 201.
adding new entry: cn=Print Operators,ou=Groups,dc=cw-server,dc=us
failed to add entry: objectClass: value #2 invalid per syntax at /usr/sbin/smbldap-populate line 499, <GEN1> line 212.
adding new entry: cn=Backup Operators,ou=Groups,dc=cw-server,dc=us
failed to add entry: objectClass: value #2 invalid per syntax at /usr/sbin/smbldap-populate line 499, <GEN1> line 223.
adding new entry: cn=Replicators,ou=Groups,dc=cw-server,dc=us
failed to add entry: objectClass: value #2 invalid per syntax at /usr/sbin/smbldap-populate line 499, <GEN1> line 234.
adding new entry: sambaDomainName=cw-server.us,dc=cw-server,dc=us
failed to add entry: invalid DN at /usr/sbin/smbldap-populate line 499, <GEN1> line 241.

Please provide a password for the domain root:
/usr/sbin/smbldap-passwd: user root doesn't exist
root@cw-server:~#