View LDAP user groups in Chat

Hello,

I have NethServer 7.3.1611 updated and I have the Chat module enabled, but I see all LDAP users in a list but not separated according to the groups that I have created.

The NethServer documentation states that it is possible:

How do I activate this option?

Thank you

I’ve found a thread with same problems, it looks like it’s not realized to have groups till now.

I have tried some of the ideas in the thread but I have not got it to work and as in the documentation it is possible that I think it should be able to do but I do not know how.

I think that when you have many users it is very important to see them organized.

I don’t installed it, but I think it’s like @giacomo said, the documentation is wrong.

I just updated the doc, it will be soon online.

1 Like

@giacomo Ok, thanks
@pedro So we have to do the workaround, can you describe me what you have tried to do?

@m.traeumner Hello, I modified the file /etc/e-smith/templates/etc/ejabberd/ejabberd.cfg/85Modules but It didn´t work. Neither the service did start up or I couldn´t see the ldap users.
What I want is to see the users groups of the ldap and the users inside each group.

At first copy the original template to

/etc/e-smith/templates-custom/etc/ejabberd/ejabberd.cfg/85Modules

please. Work with this version. For work with templates have a look at

http://docs.nethserver.org/projects/nethserver-devel/en/v7/templates.html please.

And could you post your template please?

Hello @m.traeumner,

I do not know how the templates work and my programming skills are not enough for it.
I modified the original template in:

/etc/e-smith/templates/etc/ejabberd/ejabberd.cfg/85Modules

I have tried several things, but either the Chat module does not work or I don´t get to change what it´s wrong. I enclose the last templates I used:

https://www.dropbox.com/s/axctsb7rpp25qb9/85Modules?dl=0

You only have to copy it to:

/etc/e-smith/templates-custom/etc/ejabberd/ejabberd.cfg/85Modules

make your changes here and expand it with

expand-template /etc/ejabberd/ejabberd.cfg

For the changes itself I think these are the settings you have to change:

$OUT .= <<HERE
     {ldap_filter, ""}
     {ldap_rfilter, "((objectClass=posixGroup)"},
     {ldap_ufilter, "(uid=%u)(objectClass=userJabberAccount))"},
     {ldap_groupattr, "cn"},
     {ldap_groupdesc,"description"},
     {ldap_memberattr,"uid"},
     {ldap_useruid, "uid"},
     {ldap_userdesc, "displayName"},

I found some more configuration at

ejabberd mod_shared_roster_ldap Setup

{ldap_groupattr, "cn"},
{ldap_groupdesc, "description"},
{ldap_memberattr, "member"},
{ldap_memberattr_format, "CN=%u,OU=Users,DC=matrix,DC=example,DC=com"},
{ldap_useruid, "cn"},
{ldap_userdesc, "displayName"},
{ldap_rfilter, "(&(objectClass=group)(info=JabberRosterGroup))"},
{ldap_gfilter, "(&(objectClass=group)(info=JabberRosterGroup)(cn=%g))"},
{ldap_ufilter, "(&(objectClass=user)(cn=%u))"},
{ldap_filter, ""},

phpldapadmin from stephdl could help to find the right settings.

2 Likes

@m.traeumner I´m sorry but I don´t get it to work. I give up.

@giacomo I read on a post you are thinking about updating ejabbered. I hope when you get it done you can get my problem solved and @mundor also. We will be very thankfull.

If you have problems with the templates I can help you, you have only to tell me where the problem is.