nautilus accessing samba shares doesn't use cached credentials
The bug was reported on https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/1771943
'I don't know if the bug is in nautilus or other package but accessing samba shares in a samba domain membership authentication using winbind, nautilus doesn't try to use cached credentials to access network shares. Before the upgrade to ubuntu bionic (18.04) all works as expected.
I have configured winbind bind module for samba authentication on a samba server and all seems works flawless. I have enabled winbind offline logon (in smb.conf) and cached credentials (in /etc/security/pam_winbind.conf). Offline logon seems to work but when I access samba shares, nautilus ask me for a username and password even if I log on using a valid domain account and this valid account can access the samba share.
Ok, so I have launched the command: $ LANG=C; gio mount smb://server/share
Ask for username, domain and password. I have only press return when ask for username, domain and password and the share has been mounted and these are the logs of "GVFS_DEBUG=1 gvfsd -r log":
smb: g_vfs_backend_smb_init: default workgroup = 'NULL'
smb: Added new job source 0x55a984abf130 (GVfsBackendSmb)
smb: Queued new job 0x55a984ac09d0 (GVfsJobMount)
smb: do_mount - URI = smb://server/share
smb: do_mount - try #0
smb: auth_callback - kerberos pass
smb: auth_callback - out: last_user = 'DOMAIN\username', last_domain =
'DOMAIN'
smb: do_mount - [smb://server/share; 0] res = -1, cancelled = 0, errno =
[1] 'Operazione non permessa'
smb: do_mount - after anon, enabling NTLMSSP fallback
smb: do_mount - try #1
smb: auth_callback - normal pass
smb: auth_callback - asking for password...
smb: auth_callback - out: last_user = 'DOMAIN\username', last_domain =
'DOMAIN'
smb: do_mount - [smb://server/share; 1] res = 0, cancelled = 0, errno =
[17] 'File già esistente'
smb: do_mount - login successful
smb: send_reply(0x55a984ac09d0), failed=0 ()'