[Samba] Mandrake 9.0: rpcclient problem exporting printers to samba for windows

David Woodyard dwoody1 at airmail.net
Fri Jan 31 18:16:36 GMT 2003


>From dwoody1 at airmail.net Fri Jan 31 11:55:08 2003
From: David Woodyard <dwoody1 at airmail.net>
Reply-To: dwoody1 at airmail.net
To: Buchan Milne <bgmilne at cae.co.za>
Subject: Re: [Samba] Mandrake 9.0: rpcclient problem exporting printers to 
samba for windows
Date: Fri, 31 Jan 2003 11:55:08 -0600
User-Agent: KMail/1.5


It works!!! Thanks very much for your help!!!
I added 127.0.0.1/24 to interfaces. I also uninstalled the printer from cups 
and reinstalled it to make sure I had the process down. I actually added the 
printer from KDE print manager because CUPS does not have the driver and KDE 
does.
I had to stop and restart samba before the rpcclient setdriver command worked.

I installed (using your instructions below) the driver for my Deskjet printer 
from NT it got the drivers from the NT CD and it copied them to the samba 
printer directory. I then printed a test page and got the correct printout.

It is all so easy when you have a good understanding of what needs to be done.

Thanks again,

David

On Friday 31 January 2003 08:33 am, you wrote:
> David Woodyard wrote:
> > Thanks for your quick response. I added comments below after your
> > questions. I have a Canon 5500 and HP Deskjet. Do you know where the
> > print drivers are stored on WinNT?
>
> The way to do this from NT/2k is to:
> 1)Go to //sambabox/Printers
> 2)right-click on the printer, choose properties
> 3)When prompted to install a driver, say no
> 4)Click on the advanced tab, and click "New driver"
> 5)When prompted for the windows server CD, point it at %windir%\inf
> (usually c:\winnt\inf)
>
> > What next?
> >
> > Thanks again,
> > David
> >



Subject: Re: [Samba] Mandrake 9.0: rpcclient problem exporting printers to 
samba for windows
Date: Friday 31 January 2003 08:33 am
From: Buchan Milne <bgmilne at cae.co.za>
To: dwoody1 at airmail.net

David Woodyard wrote:
> Thanks for your quick response. I added comments below after your
> questions. I have a Canon 5500 and HP Deskjet. Do you know where the print
> drivers are stored on WinNT?

The way to do this from NT/2k is to:
1)Go to //sambabox/Printers
2)right-click on the printer, choose properties
3)When prompted to install a driver, say no
4)Click on the advanced tab, and click "New driver"
5)When prompted for the windows server CD, point it at %windir%\inf
(usually c:\winnt\inf)

> What next?
>
> Thanks again,
> David
>
> On Friday 31 January 2003 03:18 am, you wrote:
>>>Date: Thu, 30 Jan 2003 17:00:21 -0600
>>>From: David Woodyard <dwoody1 at airmail.net>
>>>To: samba at samba.org
>>>Subject: [Samba]
>>> Mandrake 9.0: rpcclient problem exporting printers to samba for windows
>>>Message-ID: <200301301700.21493.dwoody1 at airmail.net>
>>>Content-Type: text/plain;
>>>  charset="us-ascii"
>>>MIME-Version: 1.0
>>>Content-Transfer-Encoding: 7bit
>>>Precedence: list
>>>Reply-To: dwoody1 at airmail.net
>>>Message: 2
>>>
>>>I am new to CUPS, after working for 4 days to get printing from WinNT to
>>>Mandrake 9.0, I give up. Here is the problem:
>>>the /etc/samba/smb.conf is setup with [printers] and [print$]. I copy the
>>>postscript drivers from adobe. I then tried to export a printer to samba
>>>with the following command
>>>	cupsaddsmb -v -U dwoody canon
>>>
>>>It did all of the commands successfully except for the last one. which
>>>was: rpcclient localhost -N -Udwoody%password -c 'setdriver canon canon'
>>>
>>>It failed with NT_STATUS_UNSUCCESSFUL.
>>>I ran the same rpcclient standalone with debug and I got several error
>>>messages. They are
>>>	1) connection refused on localhost:445 (it then used port 139 - should
>>>it?) 2) WERR_ACCESS_DENIED (this was near the end of the output)
>>>	3) NT_STATUS_UNSUCCESSFUL
>>>
>>>I have not been able to fix the first two errors. BTW, the drive shares
>>>are working correctly.
>>
>>1)Is the user dwoody in the list of "printer admin"s
>>2)Does the user dwoody have write access to the print$ share
>
> [global]
>    valid users = root, dwoody, rox
>   workgroup = WORKGROUP
>   printer admin = root, dwoody, rox
>   server string = Samba Server on Mandrake 9.0
> hosts allow = 127. 10.

Be careful with hosts allow unless you are sure reverse dns lookups work
for all clients.

>    load printers = yes
>    printcap name = cups
>    printing = cups
>   guest account = dwoody
> log file = /var/log/samba/smb.%m
>    max log size = 50
>    security = user
> encrypt passwords = no
> smb passwd file = /etc/samba/smbpasswd
>    socket options = TCP_NODELAY
> interfaces = 10.0.0.2/24

I think this could be a problem, you should list the loopback address in
your interfaces list (lo or 127.0.0.1)

>    remote announce = 10.255.255.255
>    local master = no
>    dns proxy = no
> [printers]
>    comment = All Printers
>    path = /var/spool/samba
>    browseable = no
> 	allow hosts = 10.
> 	write list = @users
>    guest ok = yes
>    readonly = yes
>    writable = no
>    printable = yes
>    create mask = 0700
> [print$]
>    path = /var/lib/samba/printers
>    browseable = yes
>    guest ok = no
>    read only = yes
>    write list = @users

And you are a member of @users?

>>3)Does the user dwoody have write access to the directories in the
>>print$ share (ie /var/lib/samba/printers/*)
>
> /var/lib/samba/printers:
> drwxrwxrwx    2 root     root         4096 Nov 25  2002 W32ALPHA/
> drwxrwxrwx    2 root     root         4096 Nov 25  2002 W32MIPS/
> drwxrwxrwx    2 root     root         4096 Nov 25  2002 W32PPC/
> drwxrwxrwx    3 root     root         4096 Aug 31 07:10 W32X86/
> drwxrwxrwx    2 root     root         4096 Nov 25  2002 WIN40/
>
> /var/lib/samba/printers/W32X86:
> total 4
> drwxr-xr-x    2 dwoody      users        4096 Aug 30 16:20 2/
>
> /var/lib/samba/printers/W32X86/2:
> total 636
> -rwxr--r--    1 dwoody      users      457600 Jan 26  2003 ADOBEPS5.DLL*
> -rwxr--r--    1 dwoody      users      135680 Jan 26  2003 ADOBEPSU.DLL*
> -rwxr--r--    1 dwoody      users       18451 Jan 26  2003 ADOBEPSU.HLP*
> -rwxr--r--    1 dwoody      users       11510 Jan 26  2003 canon.PPD*
> -rwxr--r--    1 dwoody      users        9624 Jan 25  2003 hpr.PPD*

Well, the drivers got there fine, so it's not a permissions thing.

> is it correct that the drivers are in subdirectory '2' under W32X86 rather
> than in W32X86?

Yes, for NT (IIRC), 3 for win2k.

You can do a bit of investigation by running rpcclient interactively:

$ rpcclient localhost -U dwoody

enter your password then you can run commands such as 'enumdrivers',
'enumprinters', and you should eb able to 'setdriver xxx xxx' also. Also
see the help commands in rpcclient.

Regards,
Buchan
--

|--------------Another happy Mandrake Club member--------------|

Buchan Milne                Mechanical Engineer, Network Manager
Cellphone * Work            +27 82 472 2231 * +27 21 8828820x121
Stellenbosch Automotive Engineering         http://www.cae.co.za
GPG Key                   http://ranger.dnsalias.com/bgmilne.asc
1024D/60D204A7 2919 E232 5610 A038 87B1 72D6 AC92 BA50 60D2 04A7

-------------------------------------------------------


More information about the samba mailing list