NethServer / dev

NethServer issue tracker
https://github.com/NethServer/dev/issues
63 stars 18 forks source link

Cannot login/join AD domain after Windows 11 22H2 update #6702

Closed DavidePrincipi closed 1 year ago

DavidePrincipi commented 2 years ago

After update to 22H2, Windows 11 clients cannot join or log in anymore to AD domain.

Steps to reproduce

Expected behavior

Join the domain / continue to log in.

Actual behavior

The Windows client cannot join the domain. If the client was already joined, the user cannot login.

Components

nethserver-dc-1.8.4-1.ns7.x86_64

See also

DavidePrincipi commented 2 years ago

Important notices

  1. The nethserver-dc RPM is actually attached to PR NethServer/nethserver-dc#112. Still it is not available from nethserver-testing. Updates to this issue are coming: stay tuned.
  2. When Samba 4.16 starts, it updates the DB: downgrading to 4.9 could not be possible :warning:

For each test case

  1. test the bug is not reproducible: both join and Windows 11 workstation login must work
  2. for samba file server, ensure share access is still working
  3. the procedure that changes the IP of the DC must work
  4. backup/restore should work, also starting from a Samba 4.9 backup set
  5. Windows 11 client time resync must succeed: w32tm /resync
  6. password complexity policy is honored

Useful commands


Test case 1

New installation. Enable nethserver-testing repo with the commands below, then configure a local AD account provider.

 mkdir -p /etc/e-smith/templates-custom/etc/nethserver/eorepo.conf/
 echo nethserver-testing > /etc/e-smith/templates-custom/etc/nethserver/eorepo.conf/99testing
 signal-event software-repos-save

Test case 2

Update existing installation.

yum update --enablerepo=nethserver-testing  nethserver-dc

Test case 3

Restore an old configuration backup.

  1. Enable nethserver-testing with the custom template described above for test case 1.
  2. Update nethserver-backup-config from nethserver-testing, to get https://github.com/NethServer/nethserver-backup-config/pull/45
  3. Run the restore-config procedure as usual
nethbot commented 2 years ago

in 7.9.2009/testing:

DavidePrincipi commented 2 years ago

During development I found a little regression bug:

Workaround:

DavidePrincipi commented 2 years ago

Thanks to @nrauso for reporting a regression while restoring the DC

Sep 30 10:47:34 mynscom7 esmith::event[3114]: ---> Package ns-samba.x86_64 0:4.16.5-1.ns7 will be installed
Sep 30 10:47:34 mynscom7 esmith::event[3114]: --> Processing Dependency: libgnutls.so.30(GNUTLS_3_4)(64bit) for package: ns-samba-4.16.5-1.ns7.x86_64
Sep 30 10:47:34 mynscom7 esmith::event[3114]: --> Processing Dependency: libgnutls.so.30(GNUTLS_3_6_10)(64bit) for package: ns-samba-4.16.5-1.ns7.x86_64
Sep 30 10:47:34 mynscom7 esmith::event[3114]: --> Processing Dependency: libgnutls.so.30(GNUTLS_3_6_3)(64bit) for package: ns-samba-4.16.5-1.ns7.x86_64
Sep 30 10:47:34 mynscom7 esmith::event[3114]: --> Processing Dependency: libgnutls.so.30()(64bit) for package: ns-samba-4.16.5-1.ns7.x86_64
Sep 30 10:47:34 mynscom7 esmith::event[3114]: --> Finished Dependency Resolution
Sep 30 10:47:34 mynscom7 esmith::event[3114]: Error: Package: ns-samba-4.16.5-1.ns7.x86_64 (/ns-samba-M6f19bog5.x86_64)
Sep 30 10:47:34 mynscom7 esmith::event[3114]:           Requires: libgnutls.so.30()(64bit)
Sep 30 10:47:34 mynscom7 esmith::event[3114]: Error: Package: ns-samba-4.16.5-1.ns7.x86_64 (/ns-samba-M6f19bog5.x86_64)
Sep 30 10:47:34 mynscom7 esmith::event[3114]:           Requires: libgnutls.so.30(GNUTLS_3_6_3)(64bit)
Sep 30 10:47:34 mynscom7 esmith::event[3114]: Error: Package: ns-samba-4.16.5-1.ns7.x86_64 (/ns-samba-M6f19bog5.x86_64)
Sep 30 10:47:34 mynscom7 esmith::event[3114]:           Requires: libgnutls.so.30(GNUTLS_3_6_10)(64bit)
Sep 30 10:47:34 mynscom7 esmith::event[3114]: Error: Package: ns-samba-4.16.5-1.ns7.x86_64 (/ns-samba-M6f19bog5.x86_64)
Sep 30 10:47:34 mynscom7 esmith::event[3114]:           Requires: libgnutls.so.30(GNUTLS_3_4)(64bit)
Sep 30 10:47:34 mynscom7 esmith::event[3114]: You could try using --skip-broken to work around the problem
Sep 30 10:47:34 mynscom7 esmith::event[3114]: You could try running: rpm -Va --nofiles --nodigest

Edit: updated test case 3

nethbot commented 2 years ago

in 7.9.2009/testing:

nrauso commented 2 years ago

Test case 1: verified Test case 2: verified Test case 3 (with the new nethserver-backup-config package): verified

bonus track 1: tested GPOs deployment, too bonus track 2: tested Account Provider upgrade in the NethServer upgrade procedure scenario bonus track 3: tested Windows 10 retrocompatibility

DavidePrincipi commented 2 years ago

I had an issue with Webtop, symptom login failed:

2022-10-03 09:59:25 [ERROR] c.s.s.auth.directory.LdapDirectory - LdapError
org.ldaptive.LdapException: javax.naming.AuthenticationException: [LDAP: error code 49 - 80090308: LdapErr: DSID-0C0903A9, comment: AcceptSecurityContext error, data 531, v1db1]
        at org.ldaptive.provider.ProviderUtils.throwOperationException(ProviderUtils.java:55)
        at org.ldaptive.provider.jndi.JndiConnection.processNamingException(JndiConnection.java:619)
        at org.ldaptive.provider.jndi.JndiConnection.simpleBind(JndiConnection.java:261)
        at org.ldaptive.provider.jndi.JndiConnection.bind(JndiConnection.java:203)
        at org.ldaptive.BindOperation.invoke(BindOperation.java:28)

This is the procedure I applied to downgrade the RPM from testing:

  1. yum downgrade --noplugins nethserver-dc
  2. systemctl stop nsdc
  3. cd /var/lib/machines/ ; mv nsdc nsdc.old
  4. restore-config
DavidePrincipi commented 2 years ago

The authentication exception refers to user ldapservice.

The error code 531 leads to this PR https://github.com/NethServer/nethserver-dc/pull/71

image

By removing its userWorkstations attribute, the login succeedes. In nsdc shell run

$ ldbmodify -v -i -H /var/lib/samba/private/sam.ldb <<EOF
dn: CN=ldapservice,CN=Users,DC=ad,DC=dp,DC=nethserver,DC=net
changetype: modify
replace: userWorkstations
EOF
nethbot commented 2 years ago

in 7.9.2009/testing:

DavidePrincipi commented 2 years ago

Test case 4

nrauso commented 2 years ago

Test case 4: verified

Tested on suggested packages, even in disaster recovery scenario. Tried:

Neustradamus commented 2 years ago

@DavidePrincipi: Thanks for this big improvement that I have requested a long time ago!

DavidePrincipi commented 2 years ago

It was reported a regression of the backup-data command/procedure.

In /var/log/backup/*.log

Ran into unknown state (hex char: 29) at /usr/share/perl5/vendor_perl/NethServer/Backup.pm line 252.

The backup ends with success. The message is only annoying.

The message originates from the upstream bug https://rt.cpan.org/Public/Bug/Display.html?id=91150, since Samba DC 4.16 processes use ) in their titles. For instance run:

ps -afx -o pid,comm | grep -- \)

Older bug (related) https://rt.cpan.org/Public/Bug/Display.html?id=61946

Packages:

See also

https://community.nethserver.org/t/ran-into-unknown-state-from-backup-pm-line-252/20840


In nethserver-testing

http://packages.nethserver.org/nethserver/7.9.2009/testing/x86_64/Packages/perl-Proc-ProcessTable-0.55-1.of.el7.x86_64.rpm

DavidePrincipi commented 1 year ago

In nethserver-updates:

nethbot commented 1 year ago

in 7.9.2009/updates:

nethbot commented 1 year ago

in 7.9.2009/updates: