ldap vcard to pep converstion

44 views
Skip to first unread message

Alaash

unread,
Nov 11, 2022, 4:13:29 PM11/11/22
to Prosody IM Users
I am using ldap storage for my vcard
any way I can migrate to vcard4 pep

I have tested mod_vcard_legacy but:

Failed to migrate vCard-temp to PEP: problem emptying 'vcard' store

And don't know if migration tools support ldap storage and the configuration

Kim Alvefur

unread,
Dec 3, 2022, 11:50:51 AM12/3/22
to prosod...@googlegroups.com
Hi,
Assuming you are using https://modules.prosody.im/mod_storage_ldap.html
this module provides *read only* access, which would explain why
mod_vcard_legacy cannot delete the original after converting the legacy
vcard into vcard4.

The message about failing to remove the old data can be safely ignored,
since at this point the vcard4 has been stored and will be used going
forward.

Once you believe the conversion has been applied to all users you can
disable the migration by adding the following to your config:

```
upgrade_legacy_vcards = false
```

--
Good luck,
Kim "Zash" Alvefur

Alaash

unread,
Mar 13, 2023, 8:09:23 AM3/13/23
to Prosody IM Users
But the conversion is not happening
I want to nickname and telephoneNumber and others be converted

ldap config

authentication = 'ldap2' -- Indicate that we want to use LDAP for authentication
--storage        = 'ldap'

ldap = {

    hostname      = '', -- LDAP server location

    --use_tls     = true,

    bind_dn       =  '', -- Bind DN for LDAP authentication (optional if anonymous bind is supported)

    bind_password = '', -- Bind password (optional if anonymous bind is supported)


    user = {

      basedn        = '',

      filter        = '(&(objectClass=user)(!(userAccountControl:1.2.840.113556.1.4.803:=2)))',

      usernamefield = 'sAMAccountName',

      namefield     = 'cn',

    },
    groups = {
      basedn      = '', -- The base DN where group records can be found
      memberfield = 'member',                   -- The field that contains user ID records for this group (each member must have a corresponding entry under the user basedn with the same value in usernamefield)
      namefield   = 'cn',                          -- The field that contains the group's name (used for matching groups in LDAP to group definitions below)

--      {
--        name  = 'everyone', -- The group name that will be seen in users' rosters
--        cn    = 'Everyone', -- This field's key *must* match ldap.groups.namefield! It's the name of the LDAP group this definition represents
--        admin = false,      -- (Optional) A boolean flag that indicates whether members of this group should be considered administrators.
--      },
  {
        name  = 'admin',
        cn    = '',
        admin = true,
     },
 },
    vcard_format = {
      displayname = 'cn', -- Consult the vCard configuration section in the README
      nickname    = 'displayNamePrintable',
    --  photo       = {
    --    type   = 'image/jpeg',
    --    binval = 'jpegPhoto',
--      },
      telephone = {
        work = {
          voice = true,
          number = 'telephoneNumber',
        },
      },
},



Then in virtual host config

storage = {
         roster = "ldap";
         vcard = "ldap";
}
Reply all
Reply to author
Forward
0 new messages