Jimmy Ott | 25 Jan 2006 13:04
Picon

LDAP: homeDirectory from different attributes

Hello,

i'm using pureftp with LDAP.
is it possible to build the homeDirectory return value with more than
one attribute? and perhaps with regulary expressions?

i'm using the homeDirectory attribute for other purposes; at the moment
i've made a schema extension with an attribute FTPhomedirectory and use
this for the FTP specified homeDir, but this is not what i want.

i want to build the homeDirectory value from cn and perhaps some other
attributes. as an example:
abstract: /home/ftp/domains/≤domainname>/<cn>
example: /home/ftp/domains/onnet.ch/jott

is there any possibility for that?

many thanks for your help!
cheers jimmy

---------------------------------------------------------------------
To post a new message, e-mail: list <at> pureftpd.org
To unsubscribe, e-mail: list-unsubscribe <at> pureftpd.org
For additional commands, e-mail: list-help <at> pureftpd.org

Heiko Noordhof | 26 Jan 2006 13:34
Picon
Picon
Favicon

Re: LDAP: homeDirectory from different attributes

Jimmy Ott wrote:

>i'm using pureftp with LDAP.
>is it possible to build the homeDirectory return value with more than
>one attribute? and perhaps with regulary expressions?
>[..snip..]
>i want to build the homeDirectory value from cn and perhaps some other
>attributes. as an example:
>abstract: /home/ftp/domains/≤domainname>/<cn>
>example: /home/ftp/domains/onnet.ch/jott
>
>is there any possibility for that?
>  
>
One possibility would be to have the application you use to edit the
FTP-entries in LDAP construct the homeDirectory attribute.

If that's not possible in your case, you could use the pure-authd
daemon. This is the "hard way". This enables you to handle pure-ftpd
authentication yourself through a program or script. In the
program/script you'll need to query LDAP yourself, and construct the
home directory string the way you want.

Please note that:
- The pure-ftpd server needs to be configured for this a compile time. I
remember the package forSuSE-8 didn't support it. Debian woody and sarge
do IIRC.
- The program or script needs to exit as quickly as possible, so a C
program is probably better than a script, but more difficult.
- The program or script will run *as root*, so take care.
(Continue reading)


Gmane