Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 355
  • Last Modified:

Print to Linux from Windows NT

I have a recent installation of SAMBA which I would like to be able to print to from NT.  

I have looked at FAQ's, man pages, and web too long... It was working, but I mucked around with it and it isn't now.

Currently, when I try to print a test page from the Canon610, it says "Error writing to ...  Access denied.  Do you wish to retry or cancel the job?"

The samba-xxx.log doesn't seem to be very helpful...

Awaiting a linux guru...
0
loucks
Asked:
loucks
  • 10
  • 3
  • 2
  • +8
1 Solution
 
RoboBobCommented:
Access denied usually happens when the user you are logged into the samba server as doesnt have permission to print, make sure that you can print from the shell using the same account...
0
 
loucksAuthor Commented:
sorry, but it doesn't work...  

C:\>net use lpt3:  \\linuxdb\canon610 /user:loucks
The password is invalid for \\linuxdb\canon610.

Type the password for \\linuxdb\canon610:
System error 1240 has occurred.

The account is not authorized to login from this station.

that is what I got after I changed the smb.conf file to this:

; Security modes: USER uses Unix username/passwd, SHARE uses WfW type passwords
;        SERVER uses a Windows NT Server to provide authentication services
   security = USER
; Use password server option only with security = server

I previously had security set to SERVER and the server = to my domain controller.

Just as an aside, this is that happens when I try to stop the smb service as outlined at the top of smb.conf (start works fine):

# /etc/rc.d/init.d/smb stop
Shutting down SMB services: smbd kill: (1629) - No such pid
grep: 1629: No such file or directory
nmbd
# /etc/rc.d/init.d/smb stop
Shutting down SMB services:

Eventually, I want to be able to print to the linux box using NT authentication.

0
 
jhanceCommented:
You're using NT w/SP3, right?

See this URL for details:

http://support.microsoft.com/support/kb/articles/Q166/7/30.asp
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
loucksAuthor Commented:
Using NT/SP3 - applied fix above, now I can connect, but it still doesn't work...  Access denied...

From smbclient :
 print printer.prnt
 ERRDOS - ERRnoaccess (Access denied.)  opening printer for printer.prnt
0
 
jhanceCommented:
>From smbclient :
> print printer.prnt
> ERRDOS - ERRnoaccess (Access denied.)  opening printer for >printer.prnt

SMBCLIENT???  You said you wanted to print from NT!  Why don't you try printing from NT and show what is in the log file after that.
0
 
loucksAuthor Commented:
Yes Yes!!! I do want to print from NT...  But I thought the output of SMB client might be useful...  I can't even print from SMBClient on the same machine, so it is a linux Samba configuration problem, which has to do with access being denied.  From windows nt, it says "Access is denied" also...

This is when I try to print a test page to a port that has been mapped as below:
  net use lpt3:  \\linuxdb\canon610 /user:loucks
and enter my linux password for user loucks
The mapping goes ok...  

0
 
jhanceCommented:
From http://www.samba.bst.tj/samba/docs/faq/sambafaq-3.html#ss3.8 

The SAMBA documentation pages say to do ONE of these two things.  You appear to have done BOTH of them:

-----------

3.8 I've applied NT 4.0 SP3, and now I can't access Samba shares, Why?
As of SP3, Microsoft has decided that they will no longer default to passing clear text passwords over the network. To enable access to Samba shares from NT 4.0 SP3, you must do ONE of two things:

Set the Samba configuration option 'security = user' and implement all of the stuff detailed in ENCRYPTION.txt.
Follow Microsoft's directions for setting your NT box to allow plain text passwords. see Knowledge Base Article Q166730  

0
 
loucksAuthor Commented:
No, I have not implemented the instructions found in encryption.txt...  and the only reason I changed from security=server to security=user was to see if it was a problem with windows NT not giving authenticating passwords properly...  
Once again:  I can connect to the server and view the spool just fine, but when I try to print a test page, it hangs...


0
 
loucksAuthor Commented:
Now that I have been browsing my NT event logs, when I try to connect to the linux box, my NT server says in the event log
"unknown user name or bad password", so this is a configuration problem of linux / samba to get authentication from NT?
0
 
ahoffmannCommented:
You want to use your NT's DC as authentication server. I asume that you then do not have the users in the linux's passwd.

If so,  man smb.conf  suggest:

server = SHARE

BTW, there are a couple of parameters in smb.conf which could produce your authentication failture, for example:
  username
  username map
  valid users
  invalid users
  only user
  etc.

Also remember that the netbios name of your DC must be listed in /etc/hosts (I'm not shure if it is case-sensitive, in doubt uppercase).
 
0
 
loucksAuthor Commented:
You are right, users are not in linux's passwd.

Do you mean server = SHARE or security = SHARE?  I don't have any of those other parameters active in smb.conf.  

Please see my other question in this same topic area which might give you more clues as to what I have messed up...
0
 
ahoffmannCommented:
serurity = SHARE

sorry.
I'll check some things with samba and NT and then be back on this question and the other one.
0
 
loucksAuthor Commented:
well, with security = SHARE, smb.conf man page tells me I should only have password server when security = SERVER.  I don't think the listing in /etc/hosts is a problem because I am using DNS for netbios name resolution and the NT Server (not client) event log says that the username couldn't log on to the linux box.

But I will set security = SHARE if you think that will help.
0
 
squintCommented:
Just on a tangent......

but it sounds like life would be much simpler if you just install a lpr spooler on the NT box, and configure Linux box to only accept print jobs from NT...

.but I digress...
0
 
jprohartCommented:
why don't you use Microsoft TCP/IP Printing service ?
0
 
loucksAuthor Commented:
in answer to squint and jprohart:

I used to have my server printing to an lpd black box.  I thought:  "Gee, wouldn't it be nice if the print job didn't have to hit the network twice?".  So I set up a workstation on very old hardware to be the print server for my two main printers.   The clients keep losing the printer box (seems to happen most with WP Win 6.1).

So, my favorite professor here at the university said "Linux can do all that and more!"   So, I had an extra 5 gig harddrive laying around and decided to use it as a print spooler / online backup server.

We got the linux box to accept print jobs once.  Then I tried to add another printer port and now it won't accept print jobs.  I know it is possible because it did work for a few short minutes before I threw in the second parallel port.

I want to do this because it should be possible.
0
 
albertiCommented:
please post your smb.conf and your printcap file in /etc/ here.
0
 
rklemsCommented:
The answer here that I will provide does not use Samba at all.  I assume that you have set up lpd and can lpr files on the linux box.

First of all you will need your NT CD (You do have that don't you?)

TCP/IP Printing in Windows NT
              1.Open the Network Control Panel
              2.Click the Services tab
              3.Click ADD
              4.Choose "Microsoft TCP/IP Printing"
              5.It will ask for the location of the NT CDROM, use the CDROM
              6.Apply the changes and reboot
              7.Go to the Printer Control Panel
              8.Add A Printer
              9.Choose "My Computer"
             10.Choose "Add A Port"
             11.Choose "LPR Port"
             12.For the server name put the name of your linux box
                  For the queue name, put the name of the queue you have setup on the
                  linux box
             13.Click OK, then NEXT
             14. From here out you would then choose the stuff that applies to your printer
                   and in a few clicks you should be on your way to printing!

For info on setting up lpd, see the HOWTO's =)
0
 
loucksAuthor Commented:
No, read my answer to squint and jprohart...  I don't want stuff going over the network a million times before it gets printed.
0
 
medvitzCommented:
Actually, using TCP/IP printing won't cause any more traffic than using SAMBA.
0
 
loucksAuthor Commented:
Actually, it would.  Once to NT machine that spools to LP and once from that machine to the LPD.  2 times.

The way I want it:   Once to the linux box that prints it.  1 time.  

I am not a complete idiot.   (Pretty close, but not complete).  And no, I don't want to go around to all my machines installing TCP/IP printing services.  In this question, I am not asking how can I do something, but how can I do THIS?!
0
 
stormeriderCommented:
Also take a look at John Blair's excellent book on Samba. You will especially want to try running testparm with the options he specifies to test as if you were connecting from that machine for testing printing services.

I will bring in the book tomorrow and provide more info.
0
 
henckensCommented:
For WinNT you need to use a the samba password file for authentication.  So the user the NT client wants to use must in there to get authenticated.  Mostly in /usr/local/samba/private

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 10
  • 3
  • 2
  • +8
Tackle projects and never again get stuck behind a technical roadblock.
Join Now