[Samba] Group Membership Retrieval not using kerberos authentication

Oscar Alonso | MailTecK oalonso at mailteck.com
Fri May 3 11:25:28 UTC 2024


Hello, Kees.


> > Hello,
> >
> > I have an Active Directory domain to which a Linux machine with Ubuntu
> 20.04 LTS is joined using Winbind. The version of Winbind is 4.15.13.
> > On this machine, users authenticate via SSH using PAM (pam_winbind),
> and I need to know their group membership.
> > NSS is configured for this purpose.
> > When users authenticate via username and password, there's no issue
> retrieving the list of groups because they are obtained through the PAC of
> the Kerberos ticket.
> > However, when users authenticate via SSH public key, since there's no
> Kerberos authentication, I'm unable to retrieve the user's group list.
>
> This is done by nss_winbind.
>
> Did you install it and configure it in /etc/samba/smb.conf and add it to
> /etc/nsswitch.conf?

Yes, nss_winbind is installed, and everything was working correctly until Samba was updated from version 4.13 to 4.15.
When a user logs in with a username and password, everything works as expected.
A Kerberos ticket is obtained, and through that ticket, the user's group list is known.
However, until there's a new Kerberos ticket, that list isn't updated (or if there hasn't been previous Kerberos authentication, the groups aren't shown).

In version 4.13, when the group list wasn't updated because there hadn't been recent user authentication, what I did was clear the samlogon cache with 'net cache samlogon delete <sid>', and that triggered a new LDAP group query from the machine account. However, in version 4.15, that functionality seems to have been completely removed.

Best regards,
Oscar.



Este correo electrónico y la información contenida en él es confidencial, dirigiéndose exclusivamente a el/los destinatario/s mencionado/s en el encabezamiento. Utilícelos únicamente para la finalidad a la que se destina y no los transmita a terceros. Si usted no es el destinatario de este correo, no lo utilice; en base a la buena fe, bórrelo y no lo transmita a terceros.” Los datos personales facilitados por usted o por terceros forman parte de un fichero responsabilidad de MAILTECK S.A. con la finalidad de gestionar y mantener los contactos y relaciones que se produzcan como consecuencia de la relación que mantiene con MAILTECK S.A. La base jurídica que legitima este tratamiento, será su consentimiento, el interés legítimo o la necesidad para gestionar una relación contractual o similar. Utilícelos únicamente para la finalidad a la que se destina y no los transmita a terceros. El plazo de conservación de sus datos vendrá determinado por la relación que mantiene con nosotros. Para más información al respecto, o para ejercer sus derechos de Acceso, Rectificación, Cancelación/Supresión, Oposición, limitación o portabilidad, puede ponerse en contacto con nosotros enviando un escrito a la siguiente dirección: Avda. La Recomba 12 - 14. Pol. Industrial La Laguna. 28914 Leganés – Madrid, o mediante un correo electrónico a nuestro Delegado de Protección de Datos (dpo at mailteck.com).


More information about the samba mailing list