PDA

View Full Version : CUPS: Accessing XP printer: NT_STATUS_BAD_NETWORK_NAME



garymeer
18th November 2008, 11:02 AM
I can not access the printer on my XP machine. The XP machine can acess the printer on my Fedora machine.

When I run smbtree I can see the XP printer (on System4) just fine:

[root@system1 cups]# smbtree
Password:
WORKGROUP
\\SYSTEM4 Gary's Laptop
\\SYSTEM4\Printer Microsoft Office Document Image Writer
\\SYSTEM4\C$ Default share
\\SYSTEM4\ADMIN$ Remote Admin
\\SYSTEM4\Epson Workshop - Lower Shelf
\\SYSTEM4\SharedDocs
\\SYSTEM4\print$ Printer Drivers
\\SYSTEM4\IPC$ Remote IPC
...

SMBCLIENT looks good too:

[root@system1 cups]# smbclient -L system4
Enter root's password:
Domain=[SYSTEM4] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]

Sharename Type Comment
--------- ---- -------
IPC$ IPC Remote IPC
print$ Disk Printer Drivers
SharedDocs Disk
Epson Printer Workshop - Lower Shelf
ADMIN$ Disk Remote Admin
C$ Disk Default share
Printer Printer Microsoft Office Document Image Writer
Domain=[SYSTEM4] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]

Server Comment
--------- -------

Workgroup Master
--------- -------

The error log in cups shows the following when I try to print a test page:

D [18/Nov/2008:04:19:37 -0500] [Job 197] job-sheets=none,none
D [18/Nov/2008:04:19:37 -0500] [Job 197] banner_page = 0
D [18/Nov/2008:04:19:37 -0500] [Job 197] argv[0]="Stylus-CX3800"
D [18/Nov/2008:04:19:37 -0500] [Job 197] argv[1]="197"
D [18/Nov/2008:04:19:37 -0500] [Job 197] argv[2]="anonymous"
D [18/Nov/2008:04:19:37 -0500] [Job 197] argv[3]="Test Page"
D [18/Nov/2008:04:19:37 -0500] [Job 197] argv[4]="1"
D [18/Nov/2008:04:19:37 -0500] [Job 197] argv[5]="job-uuid=urn:uuid:e10951d9-74d2-3964-6ff6-768e0d28840b"
...
D [18/Nov/2008:04:19:37 -0500] cupsdProcessIPPRequest: 26 status_code=0 (successful-ok)
D [18/Nov/2008:04:19:37 -0500] PID 14538 (/usr/lib/cups/filter/pstops) exited with no errors.
D [18/Nov/2008:04:19:37 -0500] [Job 197] Page = 612x792; 0,0 to 612,792
D [18/Nov/2008:04:19:37 -0500] [Job 197] slow_collate=0, slow_duplex=0, slow_order=0
D [18/Nov/2008:04:19:37 -0500] [Job 197] Before copy_comments - %!PS-Adobe-3.0
...

D [18/Nov/2008:04:19:37 -0500] [Job 197] Wrote 1 pages...
D [18/Nov/2008:04:19:37 -0500] [CGI] lang="en_US.UTF8", locale="/en_US"...
D [18/Nov/2008:04:19:37 -0500] [CGI] lang="en_US.UTF8", locale="/en_US"...
D [18/Nov/2008:04:19:37 -0500] [CGI] lang="en_US.UTF8", locale="/en_US"...
D [18/Nov/2008:04:19:37 -0500] cupsdCloseClient: 26
D [18/Nov/2008:04:19:37 -0500] PID 14537 (/usr/lib/cups/cgi-bin/printers.cgi) exited with no errors.
D [18/Nov/2008:04:19:37 -0500] cupsdAcceptClient: skipping getpeercon()
D [18/Nov/2008:04:19:37 -0500] cupsdAcceptClient: 25 from localhost (Domain)
D [18/Nov/2008:04:19:37 -0500] cupsdReadClient: 25 POST / HTTP/1.1
D [18/Nov/2008:04:19:37 -0500] cupsdAuthorize: No authentication data provided.
D [18/Nov/2008:04:19:37 -0500] Get-Notifications /
D [18/Nov/2008:04:19:37 -0500] cupsdIsAuthorized: requesting-user-name="us"
D [18/Nov/2008:04:19:37 -0500] cupsdProcessIPPRequest: 25 status_code=0 (successful-ok)
D [18/Nov/2008:04:19:37 -0500] cupsdReadClient: 25 POST / HTTP/1.1
D [18/Nov/2008:04:19:37 -0500] cupsdAuthorize: No authentication data provided.
D [18/Nov/2008:04:19:37 -0500] Get-Job-Attributes ipp://localhost/jobs/197
D [18/Nov/2008:04:19:37 -0500] cupsdProcessIPPRequest: 25 status_code=0 (successful-ok)
D [18/Nov/2008:04:19:37 -0500] cupsdCloseClient: 25
E [18/Nov/2008:04:19:38 -0500] [Job 197] Connection failed: NT_STATUS_BAD_NETWORK_NAME
I [18/Nov/2008:04:19:38 -0500] Saving subscriptions.conf...
D [18/Nov/2008:04:19:39 -0500] cupsdReadClient: 23 GET /printers/Stylus-CX3800 HTTP/1.1
D [18/Nov/2008:04:19:39 -0500] cupsdAuthorize: No authentication data provided.
D [18/Nov/2008:04:19:39 -0500] [CGI] /usr/lib/cups/cgi-bin/printers.cgi started - PID = 14554
I [18/Nov/2008:04:19:39 -0500] Started "/usr/lib/cups/cgi-bin/printers.cgi" (pid=14554)
D [18/Nov/2008:04:19:39 -0500] cupsdSendCommand: 23 file=25
D [18/Nov/2008:04:19:39 -0500] cupsdAcceptClient: skipping getpeercon()
D [18/Nov/2008:04:19:39 -0500] cupsdAcceptClient: 26 from localhost (Domain)
D [18/Nov/2008:04:19:39 -0500] cupsdReadClient: 26 POST / HTTP/1.1
D [18/Nov/2008:04:19:39 -0500] cupsdAuthorize: No authentication data provided.
D [18/Nov/2008:04:19:39 -0500] CUPS-Get-Default
D [18/Nov/2008:04:19:39 -0500] cupsdProcessIPPRequest: 26 status_code=0 (successful-ok)
D [18/Nov/2008:04:19:39 -0500] [CGI] show_printer(http=0x7fd67229dca0, printer="Stylus-CX3800")
D [18/Nov/2008:04:19:39 -0500] cupsdReadClient: 26 POST / HTTP/1.1
D [18/Nov/2008:04:19:39 -0500] cupsdAuthorize: No authentication data provided.
D [18/Nov/2008:04:19:39 -0500] Get-Printer-Attributes ipp://localhost/printers/Stylus-CX3800
D [18/Nov/2008:04:19:39 -0500] cupsdProcessIPPRequest: 26 status_code=0 (successful-ok)
D [18/Nov/2008:04:19:39 -0500] [CGI] lang="en_US.UTF8", locale="/en_US"...
D [18/Nov/2008:04:19:39 -0500] cupsdReadClient: 26 POST / HTTP/1.1
D [18/Nov/2008:04:19:39 -0500] cupsdAuthorize: No authentication data provided.
D [18/Nov/2008:04:19:39 -0500] Get-Jobs ipp://localhost:631/printers/Stylus-CX3800
D [18/Nov/2008:04:19:39 -0500] cupsdProcessIPPRequest: 26 status_code=0 (successful-ok)
D [18/Nov/2008:04:19:39 -0500] [CGI] lang="en_US.UTF8", locale="/en_US"...
D [18/Nov/2008:04:19:39 -0500] [CGI] lang="en_US.UTF8", locale="/en_US"...
D [18/Nov/2008:04:19:39 -0500] [CGI] lang="en_US.UTF8", locale="/en_US"...
D [18/Nov/2008:04:19:39 -0500] cupsdCloseClient: 26
D [18/Nov/2008:04:19:39 -0500] PID 14554 (/usr/lib/cups/cgi-bin/printers.cgi) exited with no errors.
D [18/Nov/2008:04:19:39 -0500] [CGI] lang="en_US.UTF8", locale="/en_US"...
D [18/Nov/2008:04:19:39 -0500] [CGI] lang="en_US.UTF8", locale="/en_US"...
D [18/Nov/2008:04:19:39 -0500] [CGI] lang="en_US.UTF8", locale="/en_US"...
D [18/Nov/2008:04:19:39 -0500] [CGI] lang="en_US.UTF8", locale="/en_US"...
D [18/Nov/2008:04:19:39 -0500] [CGI] lang="en_US.UTF8", locale="/en_US"...
D [18/Nov/2008:04:19:39 -0500] cupsdReadClient: 22 GET /images/printer-processing.gif HTTP/1.1
D [18/Nov/2008:04:19:39 -0500] cupsdAuthorize: No authentication data provided.
D [18/Nov/2008:04:19:39 -0500] cupsdAcceptClient: skipping getpeercon()
D [18/Nov/2008:04:19:39 -0500] cupsdAcceptClient: 25 from localhost (Domain)
D [18/Nov/2008:04:19:39 -0500] cupsdReadClient: 25 POST / HTTP/1.1
D [18/Nov/2008:04:19:39 -0500] cupsdAuthorize: No authentication data provided.
D [18/Nov/2008:04:19:39 -0500] Get-Notifications /
D [18/Nov/2008:04:19:39 -0500] cupsdIsAuthorized: requesting-user-name="us"
D [18/Nov/2008:04:19:39 -0500] cupsdProcessIPPRequest: 25 status_code=0 (successful-ok)
D [18/Nov/2008:04:19:39 -0500] cupsdCloseClient: 25
E [18/Nov/2008:04:19:40 -0500] [Job 197] Connection failed: NT_STATUS_BAD_NETWORK_NAME
E [18/Nov/2008:04:19:40 -0500] [Job 197] Unable to connect to CIFS host, will retry in 60 seconds...
I [18/Nov/2008:04:19:40 -0500] Saving subscriptions.conf...

My cups printer configuration file (printers.conf) is:

# Printer configuration file for CUPS v1.3.9
# Written by cupsd on 2008-11-18 04:22
...

<Printer Stylus-CX3800>
Info EPSON Stylus CX3800
Location System4 - Lower Shelf
DeviceURI smb://System4/Epson/
State Stopped
StateMessage Unable to connect to CIFS host after (tried 3 times)
StateTime 1227000174
Accepting Yes
Shared Yes
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
OpPolicy default
ErrorPolicy stop-printer
</Printer>

And finally, my samba config file (smb.conf) is:

# Samba config file created using SWAT
# from UNKNOWN ()
# Date: 2008/11/16 21:14:52

[global]
netbios aliases = system1
server string = System1 - Samba Server Version %v
security = SHARE
passdb backend = tdbsam
guest account = us
unix password sync = Yes
log file = /var/log/samba/log.%m
max log size = 50
name resolve order = host bcast
ldap ssl = no
default service = p1006
remote announce = 192.168.1.*
idmap uid = 16777216-33554431
idmap gid = 16777216-33554431
comment = System2 - Bottom Shelf
read only = No
force create mode = 0755
directory mask = 0777
force directory mode = 0777
guest ok = Yes
hosts allow = 192.168.1.*
printing = bsd
cups options = raw
print command = lpr -r -P'%p' %s
lpq command = lpq -P'%p'
lprm command = lprm -P'%p' %j
printer name = HP-LaserJet-P1006
delete readonly = Yes

[printers]
comment = All Printers
path = /var/spool/samba
read only = Yes
create mask = 0700
printable = Yes
browseable = yes

[data]
comment = Data on System 1
path = /data

[HP]
comment = System1 - Top Shelf
path = /var/spool/samba
printable = Yes
printer name = HP-LaserJet-P10062

[HP_Raw]
comment = System1 - Top Shelf
path = /var/spool/samba
printable = Yes
available = Yes

[Epson CX3810]
comment = System1 - Bottom Shelf
printable = Yes
path = /var/spool/samba
printer name = Stylus-CX3800
available = Yes

The systems are all listed in my hosts file, and are listed the same way in my routers DHCP table.

Vouters
18th November 2008, 11:15 AM
As far as I remember it, one has to add for both Linux and Windows Samba nodes, NETBIOS node$ in tbdasm database and /etc/passwd.
This ought to explain the NT_STATUS_BAD_NETWORK_NAME error message.

Hoping this should help you.
Philippe

garymeer
19th November 2008, 12:43 PM
I don't know what you mean by "NETBIOS node$ ". and I don't know how to update the tdbasm database. I have tried using smbpasswd for the passdb backend, and have synced the users between unix and XP. Still no joy. Can you explain further where to find the NETBIOS node$ information aand how I get it into tdbasm?

Thank you

glennzo
19th November 2008, 01:08 PM
Just a thought. Move the current smb.conf to a safe place and create a new one. Keep it extremely simple / very basic and only include the printer that you're having trouble with. Leave the other(s) out for now. Might make it easier to read and easier to diagnose ??

Vouters
19th November 2008, 01:24 PM
For example, I had an Windows XP computer with a NETBIOS name PHVOUT. In my since unchanged tdbasm,
i have an account for
PHVOUT$ (I see it in the Samba users)
and I have a line containaining:
PHVOUT$:!!:504:1000:Philippe/var/lib/nobody:/sbin/nologin
in my /etc/passwd

Hoping this will help you
Philippe

Vouters
19th November 2008, 01:37 PM
Garymeer,

A tool I use to troubleshoot almost every network protocol failures is the network tracer Wireshark. Excellent tool indeed.
With this tool you likely to observe if the XP NETBIOS node name is correctly appended a '$' character. You might probably understand why your network printing is failing.

Philippe

Daanie92
13th January 2010, 04:28 PM
Garymeer,

I would like to note that you use 'smb://System4/Epson/'. I found out that the last slash can be a problem.
When I was adding a printer I entered the slash at the end. I tested it and it said that same error. Some hours later I tried it again WITHOUT the slash at the end and voila:D, it worked flawlessly.

smb://System4/Epson

If this doesn't work, I have all the names UPPERCASE. (I was trying to solve it and ran out of options)

But if it works:
Sometimes the answer is too simple to be true.

Daniel