Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#1 Le 21/12/2006, à 02:22

d9pouces

pureftpd + ldap + php : problème dans la création d'objet ldap

Voilà, j'ai installé un serveur LDAP, un apache 2+php et un pure-ftpd-ldap sur une debian etch (testing ?)
le but, c'est évidemment de faire de l'authentification ldap pour les clients du serveur FTP.
en plus, je veux créer les comptes via une interface web (codée en php)

Pour ça, je crée un objet LDAP avec les attributs suivants :

« cn: d9pouces14
gidnumber: 1002
homedirectory: /home/d9pouces14
objectclass: inetorgperson
objectclass: top
objectclass: posixaccount
objectclass: pureftpduser
uid: d9pouces14
userpassword: {CRYPT}$1$dSsGdsifsDSJKNx4G7Nf8ZE64NSV0
uidnumber: 10061
ftpstatus: enabled
ftpquotafiles: 0
ftpuploadbandwidth: 0
ftpdownloadbandwidth: 0
ftpquotambytes: 0 »

Et LDAP m'envoie bouler en disant
« Warning: ldap_add() [function.ldap-add]: Add: Invalid syntax in /var/www/myserver/users.php on line 167 »

Si je supprime les lignes
« ftpstatus: enabled
ftpquotafiles: 0
ftpuploadbandwidth: 0
ftpdownloadbandwidth: 0
ftpquotambytes: 0 »
et la classe « pureftpduser », ça marche nickel

Si je supprime juste la ligne ftpstatus: enabled
j'ai l'erreur suivante :
« Warning: ldap_add() [function.ldap-add]: Add: Internal (implementation specific) error in /var/www/myserver/users.php on line 167 »


Naturellement, j'ai bien inclus le schéma pureftpd.schema (qui est buggué, au passage:roll:) au bon endroit dans slapd.conf

Quelqu'un aurait une idée de ce qu'il faut faire ?

Note : j'ai la même erreur en essayant de créer ce genre d'objet avec phpldapadmin (en sélectionnant les mêmes classes)
Autre essai, que j'ai fait, dans le schema remplacer le booléen enabled/disabled par un entier (je me suis dit que ça pouvait venir de là) mais j'ai toujours l'erreur Warning: ldap_add() [function.ldap-add]: Add: Internal (implementation specific) error in /var/www/myserver/users.php on line 167





uname -a:
Linux parallels 2.6.18-3-686 #1 SMP Mon Dec 4 16:41:14 UTC 2006 i686 GNU/Linux

parallels:~# apt-cache show pure-ftpd-ldap
Package: pure-ftpd-ldap
Priority: optional
Section: net
Installed-Size: 452
Maintainer: Stefan Hornburg (Racke) <racke@linuxia.de>
Architecture: i386
Source: pure-ftpd
Version: 1.0.21-5
Replaces: ftp-server, pure-ftpd
Provides: ftp-server, pure-ftpd
Depends: pure-ftpd-common (= 1.0.21-5), libc6 (>= 2.3.6-6), libcap1, libldap2 (>= 2.1.17-1), libpam0g (>= 0.76), libssl0.9.8 (>= 0.9.8b-1)
Conflicts: ftp-server, pure-ftpd
Filename: pool/main/p/pure-ftpd/pure-ftpd-ldap_1.0.21-5_i386.deb
Size: 160572
MD5sum: 4c5b0f2d10c4576c3e04f1118c5c39c3
SHA1: 1293e25c491f6495a07c19b37581b012232bf39a
SHA256: 5110b7c22e215caf706bd82a5cf6ba40f666558c4df11a77cbc3f2e0e505ef58
Description: Pure-FTPd FTP server with LDAP user authentication
Pure-FTPd is a fast, production-quality, standards-conformant FTP
server based upon Troll-FTPd. Features include chrooted home directories,
virtual domains, built-in 'ls', anti-warez system, configurable ports for
passive downloads, FXP protocol, bandwidth throttling, ratios,
fortune files, Apache-like log files, fast standalone mode, atomic uploads,
text / HTML / XML real-time status report, virtual users, virtual quotas,
privilege separation, SSL/TLS and more.
Tag: filetransfer::ftp, interface::daemon, network::server, protocol::{ftp,ldap,ssl}, role::program, security::authentication, works-with::db, works-with::file


parallels:~# apt-cache show slapd
Package: slapd
Priority: optional
Section: net
Installed-Size: 2808
Maintainer: Debian OpenLDAP Maintainers <pkg-openldap-devel@lists.alioth.debian.org>
Architecture: i386
Source: openldap2.3
Version: 2.3.29-1
Replaces: libldap2, ldap-utils (<< 2.2.23-3)
Provides: ldap-server
Depends: libc6 (>= 2.3.6-6), libdb4.2, libiodbc2 (>= 3.52.4), libldap-2.3-0, libltdl3 (>= 1.5.2-2), libperl5.8 (>= 5.8., libsasl2-2, libslp1, libssl0.9.8 (>= 0.9.8c-1), libwrap0, coreutils (>= 4.5.1-1), psmisc, perl (>> 5.8.0) | libmime-base64-perl, libldap-2.3-0 (= 2.3.29-1), adduser
Pre-Depends: debconf (>= 0.5) | debconf-2.0
Recommends: db4.2-util, libsasl2-modules
Suggests: ldap-utils
Conflicts: umich-ldapd, ldap-server, libbind-dev, bind-dev, libltdl3 (= 1.5.4-1)
Filename: pool/main/o/openldap2.3/slapd_2.3.29-1_i386.deb
Size: 1150090
MD5sum: 9e21644f9284d6c81ff1fbbf1af49a5c
SHA1: 075a9757b478da8a6398f1deef56fb001a4a51cb
SHA256: 70cc075055d78f8051faf3ee373ffa4566c5455eacebde580c4c65518136c6bb
Description: OpenLDAP server (slapd)
This is the OpenLDAP (Lightweight Directory Access Protocol) standalone
server (slapd). The server can be used to provide a standalone directory
service and also includes the slurpd replication server.
Tag: interface::daemon, network::server, protocol::ldap, role::program, security::authentication, works-with::db

Hors ligne

#2 Le 28/10/2007, à 13:37

titirock

Re : pureftpd + ldap + php : problème dans la création d'objet ldap

Il y a un bug dans la version Debian de Pure-ftpd, version qui est reprise par les devs d'Ubuntu :

http://linux.derkeiler.com/Mailing-Lists/Ubuntu/2007-10/msg02944.html a écrit :

BUG: pure-ftpd-ldap (1.0.21-11ubuntu1): LDAP schema and syntax violation

    * From: Patrick Ben Koetter <p@xxxxxxxxxxxxxxxx>
    * Date: Thu, 25 Oct 2007 14:45:11 +0200

I believe I have found two errors in current pure-ftpd-ldap packages shipped
with Gutsy:

1. Syntax error in attributetype description
The attributetype description 'FTPStatus' in the pureftpd.schema that ships
with 1.0.21-11ubuntu1 has a syntax error. The word "SYNTAX" is there twice and
should only be there once:

attributetype ( 1.3.6.1.4.1.6981.11.3.7 NAME 'FTPStatus'
DESC 'Account status: enabled or disabled'
EQUALITY booleanMatch
SYNTAX SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE )
^^^^^^

The typo invalidates the schema and slapd won't start.


2. Setting either FTPStatus TRUE or FALSE always disables logins
The Syntax rule for FTPStatus only allow

s to set TRUE or FALSE. pure-ftpd
however expects either "enabled" or "disabled". If FTPStatus is present and
neither "enabled" or "disabled" are given, pure-ftpd always assumes
"disabled", which effectively disables logins if the Admin sets FTPStatus =
TRUE as required by the SYNTAX definition.


Patrick Koetter

--
state of mind
Agentur für Kommunikation, Design und Softwareentwicklung

Patrick Koetter Tel: 089 45227227
Echinger Strasse 3 Fax: 089 45227226
85386 Eching Web: http://www.state-of-mind.de

Amtsgericht München Partnerschaftsregister PR 563


Alice est née au pays des cauchemars,
Je voudrais juste la rassurer...
--------------------------------------
http://www.tuxalafenetre.net

Hors ligne

#3 Le 01/11/2007, à 02:43

titirock

Re : pureftpd + ldap + php : problème dans la création d'objet ldap


Alice est née au pays des cauchemars,
Je voudrais juste la rassurer...
--------------------------------------
http://www.tuxalafenetre.net

Hors ligne