Hi, after editing the qmail-ldap.h

from:

#define LDAP_HOMEDIR    "homeDirectory"

to

#define LDAP_HOMEDIR    "nohomeDirectory"


Everything just start to working perfect. my final ldiff looks like this:

dn: [EMAIL PROTECTED],ou=ejemplo.org,ou=vusers,dc=toronja,dc=net
objectClass: top
objectClass: qmailUser
objectClass: posixAccount
objectClass: PureFTPdUser
uid: [EMAIL PROTECTED]
cn: nbari
mail: [EMAIL PROTECTED]
mailMessageStore: /ejemplo.org/nbari
accountStatus: active
deliveryMode: nolocal
deliveryProgramPath: /usr/local/bin/procmail -p [EMAIL PROTECTED] /usr/local/etc/procmailrc
userPassword: {SSHA}GMI1U7S5iQw9xjCP7mwXi08mJ2qYu/mm
uidNumber: 80
gidNumber: 80
homeDirectory: /data/vftp/nbari
FTPStatus: enabled
FTPQuotaFiles: 50
FTPQuotaMBytes: 10


I added the posixAccount and the PureFTPdUser classes also I edited the mailMessageStore what I did specially on here was to add the slash at the beginning / (like it it where an absolute path) what it is strange (possible bug) is that in normal use (no changes on qmail-ldap.h) I do not have the leading slash and also on the control files on the ldapmessagestore I have only this : /usr/home/qmail/ maildirs (prefix) so the mailMessageStore looks like this /usr/home/ qmail/maildirs(no slash)ejemplo.org/nbari for some reasons that work, but after editing the qmail-ldap.h thhe behavior of the mailmessagestore changed. puting the full absolute path of the messageSatore also worked and the ldapmsessagestore was ignored. seems that the condition after editing the qmail-ldap.h looks like :

if mailMessageStore path exists then use it if not then try to see if using the ldapmessagestore plus the value on mailMessageStore are a valid path.

Also I had to remove the objectClass: person and the objectClass: inetOrgPerson for some know reasons they do not work with the PureFTPdUser class, so I would like to know if there is a problem if i do not put does classes.

Beside that every thing seems to work perfect, if some one has a recommendation of a better practice of doing this i will appreciate the info, for now with this ldif and with the change made to the qmail-ldap.h file I am available to manage email and ftp, also the users now can control both of the services with just one single login and password.

if any one is interested on doing something similar hope this info can help.

Regards.




On Mar 10, 2006, at 3:03 AM, Claudio Jeker wrote:

On Thu, Mar 09, 2006 at 08:19:18PM -0600, Nicolas de Bari Embriz Garcia Rojas wrote:
Hi all, I would like to use the same user and password for both email
and ftp using qmail-ldap and pure-ftpd has some one done this before
or has any idea of how to merge both ldifs and maybe have just one,
so a users can use their email has the user to login via ftp and also
when the users changes his password from the webmail, the user has
changed the password for the ftp to.


There is no problem in doing that. Just add an additional objectclass (if
necessary for pureftpd).

pureftpd uses IIRC uid, userPassword and homeDirectory (plus uidNumber and gidNumber if not set by default). Now qmail-ldap uses uid for pop3/ imap login, userPassword for password verification. The only porblem could be homeDirectory because qmail will use this plus mailMessageStore to find out where to deliver the messages. So you may need to modify LDAP_HOMEDIR
in qmail-ldap.h to point to something like noHomeDirectory.

As userPassword is used by both daemons changing it will change it for
both.

--
:wq Claudio

Reply via email to