Author Topic: Roundcube and ldap (read/write)  (Read 13542 times)

Offline Matt2cv

  • Newbie
  • *
  • Posts: 5
Roundcube and ldap (read/write)
« on: December 09, 2010, 06:04:31 AM »
Hello,

I currently use version roundcube 0.4 and openldap on the same machine.
For now, I can connect to my directory in using roundcube, but I can not change or add contact with roundcube.
Is it possible for roundcube? Is somebody has already managed to do it?

Thank you for your help.

Matt

Offline Julius Caesar

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 498
    • http://www.de-keizer.net/
Roundcube and ldap (read/write)
« Reply #1 on: December 16, 2010, 04:47:50 AM »
I have the same setup. Does the user with which you connect to the LDAP have enough rights to update the information?
Julius Caesar

You can download the Groupvice4 theme here.
Sie können Groupvice4 hier he

Offline Matt2cv

  • Newbie
  • *
  • Posts: 5
Roundcube and ldap (read/write)
« Reply #2 on: December 16, 2010, 05:47:56 AM »
I use the admin user. With phpldapadmin, I can create, update or remove any user. But with roundcube, I can't.

Offline Julius Caesar

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 498
    • http://www.de-keizer.net/
Roundcube and ldap (read/write)
« Reply #3 on: December 16, 2010, 08:26:13 AM »
Enable debug logging and check the logfiles for errors:

In the main.inc.php change the following value:

$rcmail_config['debug_level'] = 1;
to
$rcmail_config['debug_level'] = 8;
Julius Caesar

You can download the Groupvice4 theme here.
Sie können Groupvice4 hier he

Offline Matt2cv

  • Newbie
  • *
  • Posts: 5
Roundcube and ldap (read/write)
« Reply #4 on: December 16, 2010, 11:42:37 AM »
In the ldap's file, the message is "[16-Dec-2010 17:40:20 +0100]: C: Read [dn: ..." when I try to modify a contact and a message appears in roundcube like "Source in read only".

Offline Julius Caesar

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 498
    • http://www.de-keizer.net/
Roundcube and ldap (read/write)
« Reply #5 on: December 17, 2010, 03:53:23 AM »
There is an option in the ldap config in the main.inc.php to enable writing:

set
  'writable'      => false,
// Indicates if we can write to the LDAP
// If writable is true then these fields need to be populated:
// LDAP_Object_Classes, required_fields, LDAP_rdn

to
  'writable'      => true,
// Indicates if we can write to the LDAP
// If writable is true then these fields need to be populated:
// LDAP_Object_Classes, required_fields, LDAP_rdn
Julius Caesar

You can download the Groupvice4 theme here.
Sie können Groupvice4 hier he

Offline Matt2cv

  • Newbie
  • *
  • Posts: 5
Roundcube and ldap (read/write)
« Reply #6 on: December 17, 2010, 11:54:55 AM »
My config for the access to my LDAP

Code: [Select]

$rcmail_config['ldap_public']['domain.net'] = array(
  'name'            => 'Addressbook',
  'user_specific'   => true,
  'hosts'           => array('localhost'),
  'port'            => 389,
  'base_dn'         => 'ou=%u,ou=addressbook,dc=domain,dc=net',
  'bind_dn'         => 'cn=admin,dc=domain,dc=net',
  'bind_pass'       => '<password>',
  'writeable'       => true,
  'LDAP_Object_Classes' => array('top','inetOrgPerson'),
  'search_fields'   => array('cn', 'mail'),
  'required_fields' => array('cn', 'sn', 'mail'),
  'LDAP_rdn'        => 'mail',
  'ldap_version'    => 3,
  'name_field'      => 'cn',
  'firstname_field' => 'gn',
  'surname_field'   => 'sn',
  'email_field'     => 'mail',
  'scope'           => 'sub',
  'filter'          => '',
  'fuzzy_search'    => true);

Offline Julius Caesar

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 498
    • http://www.de-keizer.net/
Roundcube and ldap (read/write)
« Reply #7 on: December 27, 2010, 05:19:58 AM »
  'user_specific'   => true,
This uses user specific authentication. Set this to:

  'user_specific'   => false,
And the user specified in the config will be used.
Julius Caesar

You can download the Groupvice4 theme here.
Sie können Groupvice4 hier he

Offline madal

  • Jr. Member
  • **
  • Posts: 23
Roundcube and ldap (read/write)
« Reply #8 on: January 11, 2011, 01:18:38 PM »
hello there,

Right now when I send email it uses username from identities. so people who i sent email they get username in from. is there a way i can change  / or get the display name from LDAP so when i sent email it goes like display name ? Any tips on this would be appericiated.

Regards,
Madal

Offline Matt2cv

  • Newbie
  • *
  • Posts: 5
Roundcube and ldap (read/write)
« Reply #9 on: January 11, 2011, 06:08:53 PM »
Hi,

If I use the option

Code: [Select]
'user_specific'   => false,  

the contact don't appear in roundcube.

Thx

Offline madal

  • Jr. Member
  • **
  • Posts: 23
Roundcube and ldap (read/write)
« Reply #10 on: January 12, 2011, 03:46:52 AM »
hello Matt2cv,

we also use openldap and like to disallow changes in LDAP so I do not need to configure write access. how is your ldap config look like ? I would like to get user display name from LDAP server instead of username. could you please through me some hints ?

Madal

Offline Julius Caesar

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 498
    • http://www.de-keizer.net/
Roundcube and ldap (read/write)
« Reply #11 on: January 12, 2011, 03:59:45 AM »
Have you tried this:

'name_field'      => 'displayName',
Julius Caesar

You can download the Groupvice4 theme here.
Sie können Groupvice4 hier he

Offline madal

  • Jr. Member
  • **
  • Posts: 23
Roundcube and ldap (read/write)
« Reply #12 on: January 12, 2011, 07:49:16 AM »
Thanks,

is not these setting are for address book ? or this will also apply for user identities ?

M

Offline Julius Caesar

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 498
    • http://www.de-keizer.net/
Roundcube and ldap (read/write)
« Reply #13 on: January 12, 2011, 08:29:58 AM »
AFAIK, user identities are stored in the RoundCube-database.

However, you could try this plugin.
« Last Edit: January 12, 2011, 08:33:44 AM by Julius Caesar »
Julius Caesar

You can download the Groupvice4 theme here.
Sie können Groupvice4 hier he

Offline morganlawerence

  • Newbie
  • *
  • Posts: 1
Roundcube and ldap (read/write)
« Reply #14 on: January 12, 2011, 09:11:52 AM »
thank you.