smbspool without authentication no longer works?

Andreas Hasenack andreas at
Thu Nov 28 18:11:33 UTC 2019


is smbspool supposed to work without authentication, in the case the
printer is shared like that?

I've been tracking some bug reports about printing no longer working
with samba 4.8 or higher. The last one where I got this command below
to work was 4.7.6:

ubuntu at bionic-smb-printer:~$ /usr/lib/cups/backend/smb
smb:// 34 root page 1 options .bashrc;echo
Kerberos auth with 'root at WORKGROUP' (WORKGROUP\root) to access
'' not possible
ERROR: Session setup failed: NT_STATUS_ACCESS_DENIED
DEBUG: get_exit_code(cli=0x561bb8db7d70,
nt_status=NT_STATUS_ACCESS_DENIED [c0000022])
ATTR: auth-info-required=negotiate
DEBUG: Connected with NTLMSSP...

ubuntu at bionic-smb-printer:~$ echo $?

With, say, 4.10.7, I get:
root at nsnx:~# /usr/lib/cups/backend/smb smb:// 34
root page 1 options .bashrc; r=$?;echo;echo $r
kerberos_ccache_is_valid: Failed to get default principal from ccache:
DEBUG: This backend requires credentials!
DEBUG: get_exit_code(nt_status=NT_STATUS_ACCESS_DENIED [c0000022])
ATTR: auth-info-required=none
DEBUG: Unable to connect to CIFS host: NT_STATUS_ACCESS_DENIED

If I pass "anonymous" as the username, or even a blank space (!), then it works:
root at nsnx:~# /usr/lib/cups/backend/smb smb://\ @
34 root page 1 options .bashrc; r=$?;echo;echo $r
DEBUG: SMB connection established.


I found several bug reports, but none seems to address this issue
exactly. Some were about printing with kerberos.

More information about the samba-technical mailing list