Bug #2931

Modify all users if the ldap organisation contacts is updated

Added by stephane de Labrusse almost 7 years ago. Updated over 6 years ago.

Status:CLOSEDStart date:
Priority:NormalDue date:
Assignee:-% Done:

100%

Category:nethserver-directory
Target version:v6.5
Security class: Resolution:
Affected version:v6.5-final NEEDINFO:No

Description

I don't know if it is a bug or a unwanted feature, but when you update the organisation contacts in the server-manager, older users are not updated, only new user get the recent default entries.
I know that for sme you can ask to keep old users without update, or choose to update them

here a fragment of slapdcat

dn: cn=gaga,ou=Groups,dc=directory,dc=nh
cn: gaga
gidNumber: 5001
objectClass: posixGroup
structuralObjectClass: posixGroup
entryUUID: cef8da2e-eff7-1033-9840-65cffb042b8c
creatorsName: cn=libuser,dc=directory,dc=nh
createTimestamp: 20141024183209Z
entryCSN: 20141024183209.561921Z#000000#000#000000
modifiersName: cn=libuser,dc=directory,dc=nh
modifyTimestamp: 20141024183209Z

dn: uid=gaga,ou=People,dc=directory,dc=nh
uid: gaga
shadowMin: 0
shadowWarning: 7
shadowExpire: -1
shadowInactive: -1
gecos: gaga
shadowFlag: -1
uidNumber: 5001
gidNumber: 5001
homeDirectory: /var/lib/nethserver/home/gaga
loginShell: /usr/libexec/openssh/sftp-server
objectClass: posixAccount
objectClass: shadowAccount
objectClass: inetOrgPerson
objectClass: qmailUser
structuralObjectClass: inetOrgPerson
entryUUID: cf1176d8-eff7-1033-9841-65cffb042b8c
creatorsName: cn=libuser,dc=directory,dc=nh
createTimestamp: 20141024183209Z
telephoneNumber: 575-1685
o: Example Org
ou: Main
l: Hometown
street: 123 Main Street
cn: gaele de labrusse
givenName: gaele
sn: de labrusse
mail:
accountStatus: active
shadowMax: 180
userPassword:: e0NSWVBUfSQ2JGU0Vy5jaXJxMTNTUHdrQmMkNW5RNlRjaGZxbE84SktERFkvODN
GWXBkQ0U1blVSYXZ5MWhiemlCQ1l5b01vTEFId0I2YXNFVHRUL0lLQkZaRzk3WTZFQWFaeU01bFRx
NFhkRDd0Si8=
shadowLastChange: 16367
entryCSN: 20141024183234.048739Z#000000#000#000000
modifiersName: cn=pam,dc=directory,dc=nh
modifyTimestamp: 20141024183234Z

dn: cn=helene,ou=Groups,dc=directory,dc=nh
cn: helene
gidNumber: 5002
objectClass: posixGroup
structuralObjectClass: posixGroup
entryUUID: a92394dc-eff8-1033-9695-cddc44e863f3
creatorsName: cn=libuser,dc=directory,dc=nh
createTimestamp: 20141024183815Z
entryCSN: 20141024183815.585262Z#000000#000#000000
modifiersName: cn=libuser,dc=directory,dc=nh
modifyTimestamp: 20141024183815Z

dn: uid=helene,ou=People,dc=directory,dc=nh
uid: helene
shadowMin: 0
shadowWarning: 7
shadowExpire: -1
shadowInactive: -1
gecos: helene
shadowFlag: -1
uidNumber: 5002
gidNumber: 5002
homeDirectory: /var/lib/nethserver/home/helene
loginShell: /usr/libexec/openssh/sftp-server
objectClass: posixAccount
objectClass: shadowAccount
objectClass: inetOrgPerson
objectClass: qmailUser
structuralObjectClass: inetOrgPerson
entryUUID: a949862e-eff8-1033-9696-cddc44e863f3
creatorsName: cn=libuser,dc=directory,dc=nh
createTimestamp: 20141024183815Z
telephoneNumber: 123456789
o: Hack the Life
ou: Plop the world
l: Nowhere
street: The street with no name
cn: helene de labrusse
givenName: helene
sn: de labrusse
mail:
accountStatus: active
shadowMax: 180
userPassword:: e0NSWVBUfSQ2JGx6YUsuTE93RC5rSkpVLnYkNGNqdGZnMS5BdFkwdHJtd3pSbHJ
Wb3Y0bEw2bXpPWkRhYWtzT1dJVkRlbUpmaVdlL3A4VE85aklma1Q0anlzbmljWWZTS2ZHanhrVXVu
NHdaaGVTeC8=
shadowLastChange: 16367
entryCSN: 20141024183837.944894Z#000000#000#000000
modifiersName: cn=pam,dc=directory,dc=nh
modifyTimestamp: 20141024183837Z


Related issues

Duplicated by NethForge - Feature #2930: Update all contacts if the ldap organisation contacts is ... CLOSED

Associated revisions

Revision 2a63ded8
Added by Davide Principi over 6 years ago

Replace organization default values in LDAP. Refs #2931

The original nethserver-directory-user-modify has been diveded into
two actions:

  • nethserver-directory-organization-modify: changes LDAP organization
    fields directly, and works with and without the "username"
    argument. Without username, the action updates all user accounts.
  • nethserver-directory-user-modify: invokes lusermod on the given user.

Revision b50275dc
Added by Davide Principi over 6 years ago

New organization-save event. Refs #2931

The Organization page now signals "organization-save" event. By
default an attempt to regenerate the SSL certificate is done.

Revision 15516ccf
Added by Davide Principi over 6 years ago

Show SSL cert warning in Organization page. Refs #2931

User must be warned against recreating SSL certificate accidentally.

Revision b648a370
Added by Davide Principi over 6 years ago

Merge branch 'b2931'. Refs #2931

"Modify all users if the ldap organisation contacts is updated"

Revision 62a150d5
Added by Giacomo Sanchietti over 6 years ago

createlinks: fix bad link to nethserver-organization-modify. Refs #2931

History

#1 Updated by Davide Principi over 6 years ago

  • Duplicated by Feature #2930: Update all contacts if the ldap organisation contacts is updated added

#2 Updated by Davide Principi over 6 years ago

  • Tracker changed from Feature to Bug
  • Target version set to v6.5
  • Affected version set to v6.5-final
  • NEEDINFO changed from No to Yes

Hi Stephane,
thanks for reporting this.

I'm almost sure it is a bug!

Did you create Helene user after changing Organization contacts page?

#3 Updated by Davide Principi over 6 years ago

  • Category set to nethserver-directory
  • Status changed from NEW to TRIAGED
  • % Done changed from 0 to 20
  • NEEDINFO changed from Yes to No

Davide Principi wrote:

Did you create Helene user after changing Organization contacts page?

Thanks anyway, I can answer by myself, looking at createTimestamp values :)

20141024183209, gaga
20141024183815, helene

#4 Updated by Davide Principi over 6 years ago

  • Status changed from TRIAGED to ON_DEV
  • Assignee set to Davide Principi
  • % Done changed from 20 to 30

#5 Updated by Davide Principi over 6 years ago

  • Status changed from ON_DEV to MODIFIED
  • Assignee deleted (Davide Principi)
  • % Done changed from 30 to 60

Test case

After upgrading to the modified version the following user attribute values in LDAP must reflect default values from Organization contacts page, if the user-specific value is not set:
  • telephoneNumber
  • o
  • ou
  • l
  • street

TIP to see admin's LDAP account node type:

ldapsearch -Y EXTERNAL uid=admin
SASL/EXTERNAL authentication started
SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth
SASL SSF: 0
# extended LDIF
#
# LDAPv3
#
[...]
dn: uid=admin,ou=People,dc=directory,dc=nh
[...]
telephoneNumber: 1789-123-4561
o: Example2 Org
ou: Primary
l: Pesaro
street: 1 Main Street

#6 Updated by Davide Principi over 6 years ago

  • Status changed from MODIFIED to ON_QA
  • % Done changed from 60 to 70

In nethserver-testing:
nethserver-base-2.5.3-3.0gitb648a370.ns6.noarch.rpm
nethserver-directory-2.0.4-1.1git2a63ded.ns6.noarch.rpm

#7 Updated by Giacomo Sanchietti over 6 years ago

  • Assignee set to Giacomo Sanchietti

#8 Updated by Giacomo Sanchietti over 6 years ago

  • Status changed from ON_QA to TRIAGED
  • Assignee deleted (Giacomo Sanchietti)
  • % Done changed from 70 to 20
Test cases FAILED:
  • When creating a new user the LDAP object doesn't any of the following attributes: o, ou, l, street. These attributes are saved only if the user is modified
  • Inside the user-create and user-modify events there is a broken link to non-existing action S20nethserver-organization-modify

#9 Updated by Giacomo Sanchietti over 6 years ago

  • Status changed from TRIAGED to ON_DEV
  • Assignee set to Giacomo Sanchietti
  • % Done changed from 20 to 30

#10 Updated by Giacomo Sanchietti over 6 years ago

  • Status changed from ON_DEV to MODIFIED
  • Assignee deleted (Giacomo Sanchietti)
  • % Done changed from 30 to 60

Fixed createlinks.

#11 Updated by Giacomo Sanchietti over 6 years ago

  • Status changed from MODIFIED to ON_QA
  • % Done changed from 60 to 70
Package in nethserver-testing:
  • nethserver-directory-2.0.4-1.4git62a150d.ns6.noarch.rpm

Repeat above test cases.

#12 Updated by Stefano Fancello over 6 years ago

  • Assignee set to Stefano Fancello

#13 Updated by Stefano Fancello over 6 years ago

  • Status changed from ON_QA to VERIFIED
  • % Done changed from 70 to 90

#14 Updated by Stefano Fancello over 6 years ago

  • Assignee deleted (Stefano Fancello)

#15 Updated by Giacomo Sanchietti over 6 years ago

  • Status changed from VERIFIED to CLOSED
  • % Done changed from 90 to 100
Released in nethserver-updates:
  • nethserver-directory-2.0.5-1.ns6.noarch.rpm

Also available in: Atom PDF