Roundcube Community Forum

 

Roundcube and ldap (read/write)

Started by Matt2cv, December 09, 2010, 06:04:31 AM

Previous topic - Next topic

Matt2cv

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

Julius Caesar

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

Matt2cv

I use the admin user. With phpldapadmin, I can create, update or remove any user. But with roundcube, I can't.

Julius Caesar

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

Matt2cv

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".

Julius Caesar

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

Matt2cv

My config for the access to my LDAP


$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);

Julius Caesar

  '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

madal

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

Matt2cv

Hi,

If I use the option

'user_specific'   => false,  

the contact don't appear in roundcube.

Thx

madal

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

Julius Caesar

Have you tried this:

'name_field'      => 'displayName',
Julius Caesar

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

madal

Thanks,

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

M

Julius Caesar

#13
AFAIK, user identities are stored in the RoundCube-database.

However, you could try this plugin.
Julius Caesar

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