6 replies
by les
Most probably this is a user authentication problem. i.e. in windows 9x anyone can connect to any share printer on any windows 9x machine. In Win2k and WinXP you strike a problem of needing to assign usernames to all share resources, even printers. Hence if i try to connect to a shared printer on a win2k box i need a username and password with the ability to access the resource.
In win2k you can grab username details by either creating local accounts or getting account info from a logon domain. The other way to look at it is to allow "guest users" to print to the printer on windows but then you need to integrate this username and password into the unix side of things so that it is passed down with the lp request.
I actually use Samba on Sco to print to windows 2k pc's shared printers that are in a logon domain without a problem.
Hope this helps.
If you want more info on Samba setup let me know.
by les
When we first put samba in we had all win9x boxes so setup was simple for printing. On the windows side we shared a printer in the normal way. On Unix we created a local printer which had a device of /dev/null and a model script of network.samba (I got the samba binary compiled for sco and the network.samba script all from www.cyberpro.com.au). network.samba needs to be copied to /usr/spool/lp/model and chmod 755.
We then use redirection via the file /usr/spool/lp/remote which contains a list of local queue names and real printers to send requests to.
Insert the following line in the remote file:
HPLASER: /usr/local/samba/bin/smbclient \\CompName\Share -N -P
Save and quit and chmod 755 the file.
Under win2k we had to make thefollowing change to the remote file:
HPLASER: /usr/local/samba/bin/smbclient \\CompName\Share -U -N -P
(I dont have all my notes here so the syntax above might be slightly incorrect, please check against the man page for smbclient.)
Where password and username were either a domain user with access to the win2k resource or a local win2k user setup on the pc.
On the win2k machine we allowed particular users, in my case by selecting domain users as we use samba as a domain logon server also, access to the box.
By adding domain users we were allowing every local domain user the ability to be able to print. It should still work though if you have local users setup and are not logging into a domain.
An easy test from the unix side once you have setup the user with access to the win2k box is to use the smbclient. Again check the man page for smbclient.
See my next reply for some more detail.....
by les
....Sorry ran out of space, here's the rest...
From memory /usr/local/samba/bin/smbclient -L \\\\CompName
will let you see all shares available on a particular computer. (On trying this to a win2k box you will get a password prompt. So use the and -u options to smbclient. Once you get right through to see the share successfully you know it will work with that username and password.)
Two things to remember: 1. you may need to enable palin text passwords on the win2k side. 2. by using a username and password you need to be aware that if that password is change by a user or other you will have to manually update the remote file on unix to keep things working.
Let me know how you go.
This discussion is closed to new replies.
Trending Linux posts
Sort by Trending