Re: [PATCH] smb: client: fix multiuser mount with krb5

Namjae Jeon <[email protected]>
Newsgroups org.kernel.vger.stable,org.kernel.vger.linux-cifs
Message-ID <CAKYAXd_wGZ_YMOHi7f-EE1-PVkCt6Qbt2Uh6LwYLB_+gW3F36Q@mail.gmail.com>
On Tue, Aug 25, 2026 at 4:59 AM Paulo Alcantara <[email protected]> wrote:
>
> Customer reported that they could no longer mount their SMB shares
> with multiuser mount option and krb5.  Turned out that the client
> wasn't duplicating username option when creating multiuser
> connections, therefore failing to retrieve credentials as
> cifs.upcall(8) couldn't find them in keytab.
>
> Fix this by duplicating username option (if set) from original fs
> context before creating multiuser connections with krb5.
>
> Reproducer:
>
>   ```
>   $ ktutil
>   ktutil:  add_entry -password -p testuser -k 1 -e aes256-cts
>   Password for [email protected]:
>   ktutil:  write_kt /etc/krb5.keytab
>   ktutil:  quit
>   $ klist -ke
>   Keytab name: FILE:/etc/krb5.keytab
>   KVNO Principal
>    ---- ----------------------------------------------------------------
>      1 [email protected] (aes256-cts-hmac-sha1-96)
>   $ mount.cifs //w22-root2/scratch /mnt/1 -o \
>         uid=1000,sec=krb5,[email protected],multiuser
>   mount error(13): Permission denied
>   Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and
>   kernel log messages (dmesg)
>   ```
>
> Reported-by: Jacob Shivers <[email protected]>
> Fixes: 12b4c5d98cd7 ("smb: client: fix krb5 mount with username option")
> Signed-off-by: Paulo Alcantara <[email protected]>
> Cc: Ronnie Sahlberg <[email protected]>
> Cc: Shyam Prasad N <[email protected]>
> Cc: Tom Talpey <[email protected]>
> Cc: Bharath SM <[email protected]>
> Cc: Namjae Jeon <[email protected]>
> Cc: [email protected]
Reviewed-by: Namjae Jeon <[email protected]>
Thanks.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.