LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-08-2016, 04:53 AM   #1
procfs
Member
 
Registered: Jan 2006
Location: Sri Lanka
Posts: 632

Rep: Reputation: 34
printing to a windows shared printer requests authentication


Hi, I have a windows shared printer and this is attached to a ReadHat cups server where users can print print through application running on linux.

All seems to be fine and printing properly till some one goes switch off the printer or the print server. When the printer is inaccessible we see authentication requests on the server console (Linux), at the same time the print jobs are getting queued till we clear the backlog.

Is there a way to stop this from happening!

In error_cups log i can see below

D [08/Mar/2016:08:04:35 +0530] [Job 300002] get_exit_code(cli=0x7f3b24a81200, nt_status=c000006d)
D [08/Mar/2016:08:04:35 +0530] [Job 300002] ATTR: auth-info-required=username,password
D [08/Mar/2016:08:04:35 +0530] [Job 300002] get_exit_code(cli=0x7f3b24a92250, nt_status=c0000022)
D [08/Mar/2016:08:04:35 +0530] [Job 300002] ATTR: auth-info-required=username,password
D [08/Mar/2016:08:04:35 +0530] [Job 300002] Backend returned status 2 (authentication required)
D [08/Mar/2016:08:04:35 +0530] [Job 300002] Job held for authentication.
D [08/Mar/2016:08:04:35 +0530] [Job 300002] End of messages
D [08/Mar/2016:08:04:35 +0530] [Job 300002] printer-state=3(idle)
D [08/Mar/2016:08:04:35 +0530] [Job 300002] printer-state-message="Tree connect failed (NT_STATUS_ACCESS_DENIED)"
D [08/Mar/2016:08:04:35 +0530] [Job 300002] printer-state-reasons=none

Thanks and Regards

By the way is there a way to upload a small log file?
 
Old 03-08-2016, 07:27 AM   #2
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 5,334

Rep: Reputation: 1960Reputation: 1960Reputation: 1960Reputation: 1960Reputation: 1960Reputation: 1960Reputation: 1960Reputation: 1960Reputation: 1960Reputation: 1960Reputation: 1960
If you connect to the Windows printer using the smb protocol, then the username and password can be included when you create the printer URI using a syntax like 'smb://username:password@WORKGROUP/WINDOWSNETBIOSNAME/printersharename'
http://www.linuxtopia.org/online_boo...nting_131.html

Your log file may need to have .txt suffix in the filename to be uploaded to LQ. Use the Attachments button in the Advanced editor.

Last edited by allend; 03-08-2016 at 05:25 PM.
 
Old 03-09-2016, 01:28 AM   #3
procfs
Member
 
Registered: Jan 2006
Location: Sri Lanka
Posts: 632

Original Poster
Rep: Reputation: 34
Hi Allend, ah I have to go for advance view, thanks for the reply and let me check with the dev if your solution can be included.

Thanks and best regards
 
Old 03-15-2016, 07:18 AM   #4
procfs
Member
 
Registered: Jan 2006
Location: Sri Lanka
Posts: 632

Original Poster
Rep: Reputation: 34
Hi Allend, above did not work and I was wondering how to print from the CLI directly to a windows shared printer with out adding the printer to CUPS.

Thing is our DEV is using a java class PrintServiceLookup to do the printing, at the moment I am not sure if this support or what this is doing . Appreciate if you could give me some incite to how to?

Thanks and Best Regards

Last edited by procfs; 03-15-2016 at 07:37 AM.
 
Old 03-15-2016, 08:41 AM   #5
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 5,334

Rep: Reputation: 1960Reputation: 1960Reputation: 1960Reputation: 1960Reputation: 1960Reputation: 1960Reputation: 1960Reputation: 1960Reputation: 1960Reputation: 1960Reputation: 1960
Sorry, but this is a long way from my experience.
As near as I can judge, the class PrintServiceLookup is a level of abstraction that should not come into play. https://docs.oracle.com/javase/7/doc...iceLookup.html
Redefining the printer URI is all that I would expect to be required.
 
Old 03-15-2016, 11:31 PM   #6
procfs
Member
 
Registered: Jan 2006
Location: Sri Lanka
Posts: 632

Original Poster
Rep: Reputation: 34
Thanks Allend, no worries , appreciate all the help that you extended! But as walk-around is there any way to trap this error that prompt for a password on the server console if so our guys could send a message to the client appropriately?

Best Regards

Last edited by procfs; 03-15-2016 at 11:58 PM.
 
Old 03-16-2016, 05:00 AM   #7
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 5,334

Rep: Reputation: 1960Reputation: 1960Reputation: 1960Reputation: 1960Reputation: 1960Reputation: 1960Reputation: 1960Reputation: 1960Reputation: 1960Reputation: 1960Reputation: 1960
You could use inotifywait to watch for a change in the error_cups log file, check if the error has occurred,and if so, do some action.
 
Old 03-16-2016, 06:57 AM   #8
procfs
Member
 
Registered: Jan 2006
Location: Sri Lanka
Posts: 632

Original Poster
Rep: Reputation: 34
Thanks Allend

Best Regards
 
Old 04-18-2016, 01:40 AM   #9
procfs
Member
 
Registered: Jan 2006
Location: Sri Lanka
Posts: 632

Original Poster
Rep: Reputation: 34
Hi Allend, thanks for the help, they were able to do some changes based on your reply

Best regards
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Printing to a windows shared printer using Samba Maskkkk Slackware - Installation 4 09-02-2009 12:39 PM
Printing from Linux to shared printer on Windows XP newbjeff Linux - General 2 04-09-2008 07:58 AM
Printing to windows Shared Printer Kane2002 Linux - Hardware 3 01-28-2007 08:12 AM
Printing to windows shared printer carnold SUSE / openSUSE 1 05-09-2006 07:00 AM
Printing to a Windows Shared printer rwillard Linux - Newbie 8 03-17-2005 11:05 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:54 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration