View LDAP user groups in Chat


(Pedro Gonzalez) #1


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

(Michael Träumner) #2

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

(Pedro Gonzalez) #3

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.

(Michael Träumner) #4

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

(Giacomo Sanchietti) #5

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

(Michael Träumner) #6

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

(Pedro Gonzalez) #7

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

(Michael Träumner) #8

At first copy the original template to


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

And could you post your template please?

(Pedro Gonzalez) #9

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:


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:

(Michael Träumner) #10

You only have to copy it to:


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_useruid, "uid"},
     {ldap_userdesc, "displayName"},

I found some more configuration at

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

(Pedro Gonzalez) #11

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

(Michael Träumner) #12

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