[Samba] Samba / CUPS / Drivers

2004-02-01 Thread Kurt Pfeifle
[Samba] Samba / CUPS / Drivers
Anders Norrbring anders at norrbring.biz
Wed Jan 28 16:13:43 GMT 2004
I'm trying to figure out if it's possible to use different driver file
downloads for different printers on the system?  As of what I can see in all
doc-files I can only use ONE set of drivers for all added printers?
F.x. I have one printer that is handled by CUPS' PPD system, and one printer
that uses RAW.  

So, the first printer (PPD) should have its feed in postscript format from
the Windows clients, so they get the Adobe PS driver 
...or the CUPS PostScript Driver for Win NT/2K/XP Clients...

set by download when
they add the printer to the system.
But the second printer that should be fed by the Windows clients already
processed stream, that is, they need the printer manufacturers native
printer driver for Windows.  So, they should NOT get the Adobe friver, but a
different set.
Is it doable? 
Yes. The most easy way to do it is like this:

* install the native driver locally on the Windows client (use as the
  "print port" LPT1, just temporarily, for the sake of installation)
* then re-map the port by typing "net use LPT1: \\sambaserver\printersharename"
  into a "DOS box"
You can't set up Samba to "download the raw printer driver". If you set
up a printer on CUPS with no assigned Samba/Win-client driver deposited
in [print$], your Win-clients will always be prompted to install a local
native driver upon their first connection attempts...

I run CUPS v1.2.0b1 and Samba 2.2.5.

CUPS v1.2.0b1 ???  Are you really sure? This is by no means meant for
production use. It is for hard-core beta testers only, who know what
they're doing, and know how CUPS works. I'd rather recommend CUPS 1.1.20
for you.
Samba 2.2.5?? This is rather old (nearly 2 years)... Can't you switch to
3.0.x?
Anders Norrbring

Kurt

--
To unsubscribe from this list go to the following URL and read the
instructions:  http://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Samba / CUPS / Drivers

2004-01-28 Thread rruegner
hi,
normal you just click on the network printer on smb server
and load drivers aon the advanced modus all you have to is printer admin (
smb.conf )
study how to samba and printing,
after this is done the driver is uploaded and known to any client which will
connect later to the printer
http://www.samba.org/samba/docs/man/Samba-HOWTO-Collection.html#id2918174
This section describes three familiar methods, plus one new one, by which
printer drivers may be uploaded.

If you want to use the MS-RPC type printing, you must upload the drivers
onto the Samba server first ([print$] share). For a discussion on how to
deposit printer drivers on the Samba host (so the Windows clients can
download and use them via "Point'n'Print"), please refer to the previous
chapter of this HOWTO Collection. There you will find a description or
reference to three methods of preparing the client drivers on the Samba
server:

  a.. The GUI, "Add Printer Wizard" upload-from-a-Windows-client method.

Print Options for All Users Can't Be Set on Windows 200x/XP
How are you doing it? I bet the wrong way (it is not easy to find out,
though). There are three different ways to bring you to a dialog that seems
to set everything. All three dialogs look the same, yet only one of them
does what you intend. You need to be Administrator or Print Administrator to
do this for all users. Here is how I do in on XP:

  1.. The first wrong way:

1.. Open the Printers folder.

2.. Right-click on the printer (remoteprinter on cupshost) and select in
context menu Printing Preferences...

3.. Look at this dialog closely and remember what it looks like.


  2.. The second wrong way:

1.. Open the Printers folder.

2.. Right-click on the printer (remoteprinter on cupshost) and select
the context menu Properties.

3.. Click on the General tab.

4.. Click on the button Printing Preferences...

5.. A new dialog opens. Keep this dialog open and go back to the parent
dialog.


  3.. The third, and the correct way:

1.. Open the Printers folder.

2.. Click on the Advanced tab. (If everything is "grayed out," then you
are not logged in as a user with enough privileges).

3.. Click on the Printing Defaults... button.

4.. On any of the two new tabs, click on the Advanced... button.

5.. A new dialog opens. Compare this one to the other identical looking
one from "B.5" or A.3".

  hope this helps,

  4.. i had a few hours struggle  with the setup but now it works with
win200, XP

- Original Message - 
From: "Anders Norrbring" <[EMAIL PROTECTED]>
To: "'Chris Aitken'" <[EMAIL PROTECTED]>; "'Samba user list'"
<[EMAIL PROTECTED]>
Sent: Wednesday, January 28, 2004 9:25 PM
Subject: RE: [Samba] Samba / CUPS / Drivers


> > > > >
> > > > > I'm trying to figure out if it's possible to use different driver
> > > > > file downloads for different printers on the system?  As
> > > of what I
> > > > > can see in all doc-files I can only use ONE set of
> > > drivers for all
> > > > > added printers?
> > > > >
> > > > > F.x. I have one printer that is handled by CUPS' PPD
> > > system, and one
> > > > > printer that uses RAW.
> > > > >
> > > > > So, the first printer (PPD) should have its feed in postscript
> > > > > format
> > > > from
> > > > > the Windows clients, so they get the Adobe PS driver set
> > > by download
> > > > when
> > > > > they add the printer to the system.
> > > > >
> > > > > But the second printer that should be fed by the Windows clients
> > > > > already processed stream, that is, they need the printer
> > > > > manufacturers native printer driver for Windows.  So, they should
> > > > > NOT get the Adobe friver, but a different set.
> > > > >
> > > > > Is it doable?  I run CUPS v1.2.0b1 and Samba 2.2.5.
> > > > >
> > > > > Anders Norrbring
> > > >
> > > > Hi Anders,
> > > >
> > > > You want to run 2 different printers with samba/cups.
> > > >
> > > > 1 raw printer, and one PS printer.
> > > >
> > > > This is possible.
> > > >
> > > > I'd recommend upgrading CUPS though - 1.2 is quite old.
> > > >
> > > > Chris
> > >
> > > Thanks Chris, but CUPS v1.2 is pulled from CVS today, and not
> > > at all old..
> > > :)
> >
> > Oops - Read that as 1.1.2 :)
> >
> > Create a share 

RE: [Samba] Samba / CUPS / Drivers

2004-01-28 Thread Anders Norrbring
> > > >
> > > > I'm trying to figure out if it's possible to use different driver
> > > > file downloads for different printers on the system?  As
> > of what I
> > > > can see in all doc-files I can only use ONE set of
> > drivers for all
> > > > added printers?
> > > >
> > > > F.x. I have one printer that is handled by CUPS' PPD
> > system, and one
> > > > printer that uses RAW.
> > > >
> > > > So, the first printer (PPD) should have its feed in postscript
> > > > format
> > > from
> > > > the Windows clients, so they get the Adobe PS driver set
> > by download
> > > when
> > > > they add the printer to the system.
> > > >
> > > > But the second printer that should be fed by the Windows clients
> > > > already processed stream, that is, they need the printer
> > > > manufacturers native printer driver for Windows.  So, they should
> > > > NOT get the Adobe friver, but a different set.
> > > >
> > > > Is it doable?  I run CUPS v1.2.0b1 and Samba 2.2.5.
> > > >
> > > > Anders Norrbring
> > >
> > > Hi Anders,
> > >
> > > You want to run 2 different printers with samba/cups.
> > >
> > > 1 raw printer, and one PS printer.
> > >
> > > This is possible.
> > >
> > > I'd recommend upgrading CUPS though - 1.2 is quite old.
> > >
> > > Chris
> >
> > Thanks Chris, but CUPS v1.2 is pulled from CVS today, and not
> > at all old..
> > :)
> 
> Oops - Read that as 1.1.2 :)
> 
> Create a share in samba like this:
> 
> [print$]
> comment = Printer Drivers
> path = /home/samba/drivers
> browseable = yes
> guest ok = no
> read only = yes
> write list = user
> 
> Make sure that the user in write list is also listed in the printer admin
> section within the [printers] share.
> 
> These instructions are for samba 3 - but the basis is the same for
> uploading:
> 
> http://samba.mirror.ac.uk/samba/docs/man/CUPS-printing.html#id2933866
> 
> HTH
> 
> Chris


Thanks again Chris,  but it isn't of much help I'm afraid.  No matter how I
try, I can't get those Windows drivers in place on the Linux server.  All
that's there are the CUPS drivers, and they do download correctly.

My client is a Windows XP Pro SP1, and nowhere in there I can manage to
upload drivers for a printer to the Linux server..

Anders Norrbring


-- 
To unsubscribe from this list go to the following URL and read the
instructions:  http://lists.samba.org/mailman/listinfo/samba


RE: [Samba] Samba / CUPS / Drivers

2004-01-28 Thread Anders Norrbring
> >
> > I'm trying to figure out if it's possible to use different driver file
> > downloads for different printers on the system?  As of what I can
> > see in all
> > doc-files I can only use ONE set of drivers for all added printers?
> >
> > F.x. I have one printer that is handled by CUPS' PPD system, and
> > one printer
> > that uses RAW.
> >
> > So, the first printer (PPD) should have its feed in postscript format
> from
> > the Windows clients, so they get the Adobe PS driver set by download
> when
> > they add the printer to the system.
> >
> > But the second printer that should be fed by the Windows clients already
> > processed stream, that is, they need the printer manufacturers native
> > printer driver for Windows.  So, they should NOT get the Adobe
> > friver, but a
> > different set.
> >
> > Is it doable?  I run CUPS v1.2.0b1 and Samba 2.2.5.
> >
> > Anders Norrbring
> 
> Hi Anders,
> 
> You want to run 2 different printers with samba/cups.
> 
> 1 raw printer, and one PS printer.
> 
> This is possible.
> 
> I'd recommend upgrading CUPS though - 1.2 is quite old.
> 
> Chris

Thanks Chris, but CUPS v1.2 is pulled from CVS today, and not at all old..
:)

I know the fact that it's possible, but I don't understand how I can enable
the server to download the printer drivers to the Windows XP Pro users?

It's easy enough to just set up Samba and CUPS with 2 printers with
different drivers sets on the Linux server, no problems.  But I need the
server to transfer the correct driver depending on which of the printers the
users wants to use.  As of what I understand, the cupsaddsmb command only
supports ONE driver to be added.

Anders Norrbring


-- 
To unsubscribe from this list go to the following URL and read the
instructions:  http://lists.samba.org/mailman/listinfo/samba


RE: [Samba] Samba / CUPS / Drivers

2004-01-28 Thread Chris Aitken
> > >
> > > I'm trying to figure out if it's possible to use different driver 
> > > file downloads for different printers on the system?  As 
> of what I 
> > > can see in all doc-files I can only use ONE set of 
> drivers for all 
> > > added printers?
> > >
> > > F.x. I have one printer that is handled by CUPS' PPD 
> system, and one 
> > > printer that uses RAW.
> > >
> > > So, the first printer (PPD) should have its feed in postscript 
> > > format
> > from
> > > the Windows clients, so they get the Adobe PS driver set 
> by download
> > when
> > > they add the printer to the system.
> > >
> > > But the second printer that should be fed by the Windows clients 
> > > already processed stream, that is, they need the printer 
> > > manufacturers native printer driver for Windows.  So, they should 
> > > NOT get the Adobe friver, but a different set.
> > >
> > > Is it doable?  I run CUPS v1.2.0b1 and Samba 2.2.5.
> > >
> > > Anders Norrbring
> > 
> > Hi Anders,
> > 
> > You want to run 2 different printers with samba/cups.
> > 
> > 1 raw printer, and one PS printer.
> > 
> > This is possible.
> > 
> > I'd recommend upgrading CUPS though - 1.2 is quite old.
> > 
> > Chris
> 
> Thanks Chris, but CUPS v1.2 is pulled from CVS today, and not 
> at all old..
> :)

Oops - Read that as 1.1.2 :)

Create a share in samba like this:

[print$]
comment = Printer Drivers
path = /home/samba/drivers
browseable = yes
guest ok = no
read only = yes
write list = user

Make sure that the user in write list is also listed in the printer admin
section within the [printers] share.

These instructions are for samba 3 - but the basis is the same for
uploading:

http://samba.mirror.ac.uk/samba/docs/man/CUPS-printing.html#id2933866

HTH

Chris

> 
> I know the fact that it's possible, but I don't understand 
> how I can enable the server to download the printer drivers 
> to the Windows XP Pro users?
> 
> It's easy enough to just set up Samba and CUPS with 2 
> printers with different drivers sets on the Linux server, no 
> problems.  But I need the server to transfer the correct 
> driver depending on which of the printers the users wants to 
> use.  As of what I understand, the cupsaddsmb command only 
> supports ONE driver to be added.
> 


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

-- 
To unsubscribe from this list go to the following URL and read the
instructions:  http://lists.samba.org/mailman/listinfo/samba


RE: [Samba] Samba / CUPS / Drivers

2004-01-28 Thread Anders Norrbring
> >
> > I'm trying to figure out if it's possible to use different driver file
> > downloads for different printers on the system?  As of what I can
> > see in all
> > doc-files I can only use ONE set of drivers for all added printers?
> >
> > F.x. I have one printer that is handled by CUPS' PPD system, and
> > one printer
> > that uses RAW.
> >
> > So, the first printer (PPD) should have its feed in postscript format
> from
> > the Windows clients, so they get the Adobe PS driver set by download
> when
> > they add the printer to the system.
> >
> > But the second printer that should be fed by the Windows clients already
> > processed stream, that is, they need the printer manufacturers native
> > printer driver for Windows.  So, they should NOT get the Adobe
> > friver, but a
> > different set.
> >
> > Is it doable?  I run CUPS v1.2.0b1 and Samba 2.2.5.
> >
> > Anders Norrbring
> 
> Hi Anders,
> 
> You want to run 2 different printers with samba/cups.
> 
> 1 raw printer, and one PS printer.
> 
> This is possible.
> 
> I'd recommend upgrading CUPS though - 1.2 is quite old.
> 
> Chris

Thanks Chris, but CUPS v1.2 is pulled from CVS today, and not at all old..
:)

I know the fact that it's possible, but I don't understand how I can enable
the server to download the printer drivers to the Windows XP Pro users?

It's easy enough to just set up Samba and CUPS with 2 printers with
different drivers sets on the Linux server, no problems.  But I need the
server to transfer the correct driver depending on which of the printers the
users wants to use.  As of what I understand, the cupsaddsmb command only
supports ONE driver to be added.

Anders Norrbring


-- 
To unsubscribe from this list go to the following URL and read the
instructions:  http://lists.samba.org/mailman/listinfo/samba


RE: [Samba] Samba / CUPS / Drivers

2004-01-28 Thread Chris Aitken


> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of
> Anders Norrbring
> Sent: 28 January 2004 16:14
> To: Samba user list
> Subject: [Samba] Samba / CUPS / Drivers
>
>
>
> I'm trying to figure out if it's possible to use different driver file
> downloads for different printers on the system?  As of what I can
> see in all
> doc-files I can only use ONE set of drivers for all added printers?
>
> F.x. I have one printer that is handled by CUPS' PPD system, and
> one printer
> that uses RAW.
>
> So, the first printer (PPD) should have its feed in postscript format from
> the Windows clients, so they get the Adobe PS driver set by download when
> they add the printer to the system.
>
> But the second printer that should be fed by the Windows clients already
> processed stream, that is, they need the printer manufacturers native
> printer driver for Windows.  So, they should NOT get the Adobe
> friver, but a
> different set.
>
> Is it doable?  I run CUPS v1.2.0b1 and Samba 2.2.5.
>
> Anders Norrbring

Hi Anders,

You want to run 2 different printers with samba/cups.

1 raw printer, and one PS printer.

This is possible.

I'd recommend upgrading CUPS though - 1.2 is quite old.

Chris


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

-- 
To unsubscribe from this list go to the following URL and read the
instructions:  http://lists.samba.org/mailman/listinfo/samba


[Samba] Samba / CUPS / Drivers

2004-01-28 Thread Anders Norrbring

I'm trying to figure out if it's possible to use different driver file
downloads for different printers on the system?  As of what I can see in all
doc-files I can only use ONE set of drivers for all added printers?

F.x. I have one printer that is handled by CUPS' PPD system, and one printer
that uses RAW.  

So, the first printer (PPD) should have its feed in postscript format from
the Windows clients, so they get the Adobe PS driver set by download when
they add the printer to the system.

But the second printer that should be fed by the Windows clients already
processed stream, that is, they need the printer manufacturers native
printer driver for Windows.  So, they should NOT get the Adobe friver, but a
different set.

Is it doable?  I run CUPS v1.2.0b1 and Samba 2.2.5.

Anders Norrbring


-- 
To unsubscribe from this list go to the following URL and read the
instructions:  http://lists.samba.org/mailman/listinfo/samba


[Samba] Samba+CUPS+Drivers autodownload

2003-06-03 Thread Matt Dainty
Hi again,

I'm still trying to set my Samba box up to allow the Adobe PS drivers to
be automatically downloaded.

Thanks to a couple of replies, I've tried three courses of action, none
of which have been successful. These are:

1) Fix for source/lib/util_unistr.c (bugid #82)

2) Comment out the lines in source/rpc_server/srv_spoolss_nt.c enclosed
   between /* BEGIN_ADMIN_LOG */ and /* END_ADMIN_LOG */

3) Use the rpcclient binary from a 3.0 source build

Using the first two, I still get a NT_STATUS_UNSUCCESSFUL using the
"rpcclient adddriver". Using the rpcclient binary from a 3.0 source
build, (alpha24), I instead get a WERR_BADFILE for the same command.

Here's running "cupsaddsmb -v" with fixes 1) & 2):

# /usr/sbin/cupsaddsmb -v -U root oki7200
Password for root required to access localhost via SAMBA: 
Running command: smbclient //localhost/print\$ -N -U'root%secret' -c 'mkdir W32X86;put 
/var/spool/cups/tmp/3edb1698e3fc0 W32X86/oki7200.PPD;put 
/usr/share/cups/drivers/ADOBEPS5.DLL W32X86/ADOBEPS5.DLL;put 
/usr/share/cups/drivers/ADOBEPSU.DLL W32X86/ADOBEPSU.DLL;put 
/usr/share/cups/drivers/ADOBEPSU.HLP W32X86/ADOBEPSU.HLP'
added interface ip=192.168.50.129 bcast=192.168.50.255 nmask=255.255.255.128
added interface ip=127.0.0.1 bcast=127.255.255.255 nmask=255.0.0.0
Domain=[XREFER] OS=[Unix] Server=[Samba 2.2.9pre1]
NT_STATUS_OBJECT_NAME_COLLISION making remote directory \W32X86
putting file /var/spool/cups/tmp/3edb1698e3fc0 as \W32X86/oki7200.PPD (16523.1 kb/s) 
(average 16523.4 kb/s)
putting file /usr/share/cups/drivers/ADOBEPS5.DLL as \W32X86/ADOBEPS5.DLL (22343.6 
kb/s) (average 21179.7 kb/s)
putting file /usr/share/cups/drivers/ADOBEPSU.DLL as \W32X86/ADOBEPSU.DLL (22083.0 
kb/s) (average 21354.6 kb/s)
putting file /usr/share/cups/drivers/ADOBEPSU.HLP as \W32X86/ADOBEPSU.HLP (18016.8 
kb/s) (average 21250.3 kb/s)

Running command: rpcclient localhost -N -U'root%secret' -c 'adddriver "Windows NT x86" 
"oki7200:ADOBEPS5.DLL:oki7200.PPD:ADOBEPSU.DLL:ADOBEPSU.HLP:NULL:RAW:NULL"'
cmd = adddriver "Windows NT x86" 
"oki7200:ADOBEPS5.DLL:oki7200.PPD:ADOBEPSU.DLL:ADOBEPSU.HLP:NULL:RAW:NULL"
result was NT_STATUS_UNSUCCESSFUL

Running command: smbclient //localhost/print\$ -N -U'root%secret' -c 'mkdir WIN40;put 
/var/spool/cups/tmp/3edb1698e3fc0 WIN40/oki7200.PPD;put 
/usr/share/cups/drivers/ADFONTS.MFM WIN40/ADFONTS.MFM;put 
/usr/share/cups/drivers/ADOBEPS4.DRV WIN40/ADOBEPS4.DRV;put 
/usr/share/cups/drivers/ADOBEPS4.HLP WIN40/ADOBEPS4.HLP;put 
/usr/share/cups/drivers/DEFPRTR2.PPD WIN40/DEFPRTR2.PPD;put 
/usr/share/cups/drivers/ICONLIB.DLL WIN40/ICONLIB.DLL;put 
/usr/share/cups/drivers/PSMON.DLL WIN40/PSMON.DLL;'
added interface ip=192.168.50.129 bcast=192.168.50.255 nmask=255.255.255.128
added interface ip=127.0.0.1 bcast=127.255.255.255 nmask=255.0.0.0
Domain=[XREFER] OS=[Unix] Server=[Samba 2.2.9pre1]
NT_STATUS_OBJECT_NAME_COLLISION making remote directory \WIN40
putting file /var/spool/cups/tmp/3edb1698e3fc0 as \WIN40/oki7200.PPD (20653.8 kb/s) 
(average 20654.3 kb/s)
putting file /usr/share/cups/drivers/ADFONTS.MFM as \WIN40/ADFONTS.MFM (22483.2 kb/s) 
(average 22231.0 kb/s)
putting file /usr/share/cups/drivers/ADOBEPS4.DRV as \WIN40/ADOBEPS4.DRV (23008.5 
kb/s) (average 22740.1 kb/s)
putting file /usr/share/cups/drivers/ADOBEPS4.HLP as \WIN40/ADOBEPS4.HLP (21317.0 
kb/s) (average 22602.4 kb/s)
putting file /usr/share/cups/drivers/DEFPRTR2.PPD as \WIN40/DEFPRTR2.PPD (13174.5 
kb/s) (average 22502.1 kb/s)
putting file /usr/share/cups/drivers/ICONLIB.DLL as \WIN40/ICONLIB.DLL (23071.4 kb/s) 
(average 22530.9 kb/s)
putting file /usr/share/cups/drivers/PSMON.DLL as \WIN40/PSMON.DLL (18666.1 kb/s) 
(average 22417.3 kb/s)

Running command: rpcclient localhost -N -U'root%secret' -c 'adddriver "Windows 4.0" 
"oki7200:ADOBEPS4.DRV:oki7200.PPD:NULL:ADOBEPS4.HLP:PSMON.DLL:RAW:ADOBEPS4.DRV,oki7200.PPD,ADOBEPS4.HLP,PSMON.DLL,ADFONTS.MFM,DEFPRTR2.PPD,ICONLIB.DLL"'
cmd = adddriver "Windows 4.0" 
"oki7200:ADOBEPS4.DRV:oki7200.PPD:NULL:ADOBEPS4.HLP:PSMON.DLL:RAW:ADOBEPS4.DRV,oki7200.PPD,ADOBEPS4.HLP,PSMON.DLL,ADFONTS.MFM,DEFPRTR2.PPD,ICONLIB.DLL"
result was NT_STATUS_UNSUCCESSFUL

Running command: rpcclient localhost -N -U'root%secret' -c 'setdriver oki7200 oki7200'
cmd = setdriver oki7200 oki7200
Succesfully set oki7200 to driver oki7200.

Here's running "cupsaddsmb -v" with fixes 1), 2), & 3) (the 3.0 rpcclient):

# /usr/sbin/cupsaddsmb -v -U root oki7200
Password for root required to access localhost via SAMBA: 
Running command: smbclient //localhost/print\$ -N -U'root%secret' -c 'mkdir W32X86;put 
/var/spool/cups/tmp/3edb1611677d2 W32X86/oki7200.PPD;put 
/usr/share/cups/drivers/ADOBEPS5.DLL W32X86/ADOBEPS5.DLL;put 
/usr/share/cups/drivers/ADOBEPSU.DLL W32X86/ADOBEPSU.DLL;put 
/usr/share/cups/drivers/ADOBEPSU.HLP W32X86/ADOBEPSU.HLP'
added interface ip=192.168.50.129 bcast=192.168.50.255 nmask=255.255.255.128
added interface ip=127.0.0.1 bcast=127.255.255.255 nmask=255.0.0.0
Domain=[XREFER] OS=[Unix] Server=[Samba 

[Samba] Samba+CUPS+Drivers autodownload

2003-05-30 Thread Dragan Krnic
Hi Matt,

the problem you referred to is discussed in detail
as bug #82 in Samba's bug tracking tool. It consists
of 2 bugs. One prevents the registration of drivers
and is due to a NULL-pointer passed from that part
of code in rpc_server/srv_spoolss_nt.c which calls 
sys_adminlog function. It begins with the comment

   /* BEGIN_ADMIN_LOG */

and ends with the comment

   /* END_ADMIN_LOG */

The comments surround the code which should log
that a printer driver has been added, listing
driver's name, its OS, and admin's name. Since
this sys-admin-logging is non-essential for the 
operation of Samba and CUPS you may simply extend
the comment to include the whole code in between
the two comments by removing the first "*/" and
the second "/*" like this:

   /* BEGIN_ADMIN_LOG
. code here commented out 
  END_ADMIN_LOG */

Samba built with this change will not report
NT_STATUS_UNSUCCESSFUL when you execute "adddriver"
subcommand of rpcclient.

The other bug prevents rpcclient's "enumdrivers"
subcommands from completing and can be fixed by 
changing the line #943 in lib/util_unistr.c so
that it reads:

  src_len = ( src == NULL ? 0 :  strlen_w(src)*2+2 );

instead of just

  src_len = strlen_w(src)*2+2;

So that you may find that part easily, here are the
7 lines surrounding and including the offending line:

940dest_len=MAXUNI-3;
941
942if (flags & STR_TERMINATE) 
943   src_len = strlen_w(src)*2+2;
944 
945dest_len = MIN((src_len/2), (dest_len-1));
946unistr_to_ascii(dest, src, dest_len);

Another problem is building a fixed version of Samba.
Somehow, the Linux vendors refrain from disclosing
in full detail the files necessary for the build.

They all more or less build their packages with
"rpm -bb" which requires a ".spec" file. This is a 
kind of script listing all the dependencies, 
prerequisites, and steps to be taken in order to
build an RPM fully automatically. Some of these 
steps consist of patching different original Samba 
files to either fix defects discovered after a major
release came out or that are known to occur only in a 
specific distro, in other words to make it adhere to 
some specifics of a vendor's distro. The patch files
are the correct place to register such changes to
the source code as I mentioned above.

However, vendors just mirror the latest samba source 
and let YOU figure out what is needed to be done in 
order for the software to build and run. In my view 
this is in clear contravention of the GPL!!! The 
vendors are selling the work of others omitting the 
essential information which makes it tick on their 
particular distro. This is a SERIOUS PROBLEM which
has to be raised, unless of course it is just my
inability to locate those informations on the web.

In my case, SuSE 8.2, the vendor did a thorough job
of providing almost all of the pre-requisite files on 
their sites. The missing ones were a few documents and 
a couple of template Samba configuration files which 
were already in their original 2.2.8a offering. It 
wasn't difficult to just copy those files into 
the /usr/src/packages/SOURCES with the rest.

But try that with RedHat! I would really like to 
know which other vendors provide their customer with
such informations in full detail.

What is missing even in SuSE's documentation is a
list of all the devel packages which need to be
installed on a system in order to be able to build
samba. I mean, I ran myself into the problem that 
configure failed and stopped the build when it tried 
to verify if it can use the included popt lib. It 
couldn't compile the test case because I didn't have
"openldap2-deve-l2.1.12-44" installed. My guess is 
that you probably need the following:

   cups-devel-1.1.18-56
   libacl-devel-2.2.6-8
   libattr-devel-2.4.0-14
   libsmbclient-devel-2.2.8a-3
   openldap2-devel-2.1.12-44
   openssl-devel-0.9.6i-12
   pam-devel-0.77-38
   popt-devel-1.6.4-31

but I'm not sure because I've installed all devel 
packages (130 of them) just in case. I would be much
obliged if someone could correct this list, if
something is missing or superfluous.

Matt, I hope this information helps anyone confronted 
with this bug in 2.2.8a. If you happen to have SuSE
8.2 on your system, I might send you a tarball with
.spec and related files for the build. I guess that 
the same files would also work for RedHat and other 
distros but then again I might be wrong.

Cheers
Dragan



Get advanced SPAM filtering on Webmail or POP Mail ... Get Lycos Mail!
http://login.mail.lycos.com/r/referral?aid=27005
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  http://lists.samba.org/mailman/listinfo/samba