[horde] RE : ldap adding editing users

support_mail support_mail at adi.gotdns.com
Mon Dec 20 00:51:34 PST 2004


For me i use this only for Turba adress book and i think this is not to
identifie sombody in horde login ?

Message: 1
Date: Sat, 18 Dec 2004 00:51:51 -0000
From: "alan walters" <alan at eudaemony.org>
Subject: [horde] ldap adding editing users
To: horde at lists.horde.org
Message-ID: <cpvuvc$ms1$1 at sea.gmane.org>

below is all i can manage with my ldap editing and adding of users

i am confused of the syntax used. i understand the ldap schema and modfing 
edit and adding ldifs i am fine with but this has got me



i any one could provide me with a little more to get the below to work i 
would love the help

the dn of the entry below is along with a basic account below this is the 
horde ldap_add_modify hook. i have many jvd entries but i am happy to get 
around that another way if it jeust worked for this one it would be good



look forward to some help please. horde has been excellent but the ldap 
migration to it has been a little difficult

dn: 
mail=tina at limestonechat.com,jvd=limestonechat.com,o=clients,dc=hosting,dc=ra
diowave.ie

objectClass: top

objectClass: JammMailAccount

objectClass: PureFTPdUser

objectClass: organizationalPerson

objectclass: radiusprofile

cn: tina o connell

title: Mr

street: 18 ballyvaughan cottages ballyvaughan

telexNumber: 087 7495705

telephoneNumber: 0657077036

facsimileTelephoneNumber: 0857077170

postalAddress: the caves, ballvaughan

postalCode: 8001

mail: tina at limestonechat.com

lastChange: 1044310961

homeDirectory: /home/vmail/domains

mailbox: limestonechat.com/tina/

delete: FALSE

accountActive: TRUE

FTPStatus: Enabled

FTPuid: 1002

FTPgid: 1002

FTPQuotaFiles: 100

FTPQuotaMBytes: 500

userPassword:: dsfhdsjhsdfkhjdhkds

radiusFramedIPAddress: 10.4.230.11

radiusClass: ballyvaughan



if (!function_exists('_horde_hook_authldap')) {

function _horde_hook_authldap($userID, $credentials = null)

{

$entry['dn'] = 'mail=' . $userID . ',o=clients,dc=hosting,dc=radiowave.ie';

if (isset($credentials) && isset($credentials['user_fullname'])) {

$entry['mail'] = $credentials['user_fullname'];

} else {

$entry['mail'] = $userID;

}

$entry['mail'] = $userID;

$entry['objectclass'][0] = 'top';

$entry['objectclass'][1] = 'JammMailAccount';

$entry['objectclass'][2] = 'PureFTPdUser';

$entry['objectclass'][3] = 'organizationalPerson';

$entry['objectclass'][4] = 'radiusprofile';

$entry['cn'] = 'userfirstname userlastname';

$entry['street'] = 'ur address in full';

$entry['telephoneNumber'] = '00000000000';

$entry['mobiletelephoneNumber'] = '0000000000';

$entry['postalAddress'] = 'full postal address if differnet';

$entry['lastChanged'] = 'presentdate or last changed date';

$entry['mail'] = $userID; (this is the full user at example.com)

$entry['mailhost'] = 'mail.example.com';

$entry['homeDirectory'] = '/home/vmail/domains';

$entry['mailbox'] = (i want this to be the domain of mail and then the 
stripped username)

$entry['accountActive'] = 'True';

$entry['delete'] = 'FALSE';

$entry['radiusClass'] = 'ballvaughan';

$entry['radiusFramedIPAddress'] = '10.4.230.0';

$entry['FTPStatus'] = 'Enabled';

$entry['FTPuid'] = '1002';

$entry['FTPgid'] = '1002';

$entry['FTPQuotaFiles'] = '100';

$entry['FTPQuotaMBytes'] = '500';

$entry['uidNumber'] = 110;

$entry['gidNumber'] = 110;

// need to check for new users (password) and edited users (user_pass_2)

if (isset($credentials) && isset($credentials['password'])) {

$entry['userPassword'] = '{MD5}' . base64_encode(mHash(MHASH_MD5, 
$credentials['password']));

} else if (isset($credentials) && isset($credentials['user_pass_2'])) {

$entry['userPassword'] = '{MD5}' . base64_encode(mHash(MHASH_MD5, 
$credentials['user_pass_2']));

}

$entry['deliveryMode'] = 'nolocal';

return $entry;

}

}






More information about the horde mailing list