Solved

Print to Linux from Windows NT

Posted on 1998-06-15
23
292 Views
Last Modified: 2010-05-18
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
Comment
Question by:loucks
  • 10
  • 3
  • 2
  • +8
23 Comments
 
LVL 1

Expert Comment

by:RoboBob
ID: 1584516
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
 

Author Comment

by:loucks
ID: 1584517
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
 
LVL 32

Expert Comment

by:jhance
ID: 1584518
You're using NT w/SP3, right?

See this URL for details:

http://support.microsoft.com/support/kb/articles/Q166/7/30.asp
0
 

Author Comment

by:loucks
ID: 1584519
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
 
LVL 32

Expert Comment

by:jhance
ID: 1584520
>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
 

Author Comment

by:loucks
ID: 1584521
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
 
LVL 32

Expert Comment

by:jhance
ID: 1584522
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
 

Author Comment

by:loucks
ID: 1584523
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
 

Author Comment

by:loucks
ID: 1584524
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
 
LVL 51

Expert Comment

by:ahoffmann
ID: 1584525
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
 

Author Comment

by:loucks
ID: 1584526
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 51

Expert Comment

by:ahoffmann
ID: 1584527
serurity = SHARE

sorry.
I'll check some things with samba and NT and then be back on this question and the other one.
0
 

Author Comment

by:loucks
ID: 1584528
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
 
LVL 2

Expert Comment

by:squint
ID: 1584529
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
 
LVL 2

Expert Comment

by:jprohart
ID: 1584530
why don't you use Microsoft TCP/IP Printing service ?
0
 

Author Comment

by:loucks
ID: 1584531
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
 

Expert Comment

by:alberti
ID: 1584532
please post your smb.conf and your printcap file in /etc/ here.
0
 

Expert Comment

by:rklems
ID: 1584533
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
 

Author Comment

by:loucks
ID: 1584534
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
 

Expert Comment

by:medvitz
ID: 1584535
Actually, using TCP/IP printing won't cause any more traffic than using SAMBA.
0
 

Author Comment

by:loucks
ID: 1584536
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
 
LVL 1

Expert Comment

by:stormerider
ID: 1584537
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
 
LVL 1

Accepted Solution

by:
henckens earned 300 total points
ID: 1584538
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

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now