[Samba] Problems adding print drivers

Corey McGuire coreyfro at coreyfro.com
Tue May 6 22:19:38 GMT 2003


First, I'd like to apologize to the admin, I accidentally emailed from my
work account which isn’t on the list. Probably not a problem, but, none
“sorry” the less.

>Have you checked the newly drafted documentation about this on
>
>http://www.linuxprinting.org/kpfeifle/SambaPrintHOWTO/

No, I’ll check that out.

> Have you tried to run
>
> * "smbclient ... put [all driver files ot print$ share]"
> * "rpcclient ... adddriver [with correct arguments]"
> * "rpcclient ... setdriver [with correct arguments]"
>

Yes, I did try. I tried the arguments that cupsaddsmb generated, and
manually formed the command myself. The output I gave is one of countless
attempts.

>> I isolated the problem to a rpcclient and here is the information I
>> gathered from the various commands.
>> 
>> If I delete all the files in "/var/lib/samba/drivers" cupsaddsmb stalls
>> the folders and files, but doesn't move the files in to the WIN40/0
folder
>> with the adddriver command.
>
>That *should* happen. As well as moving the other files to the W32X86/2/
>directory.

Yes, it does neither.

>> I am using SuSE 8.1 with samba 2.2.5
>
>Ok -- but what's the version of CUPS SuSE 8.1 was shipping?

Looks like 1.1.15

>Which are ownership and access rights for W32X86?

DvPrntSvr:/var/lib/samba/drivers # ls -laR
.:
total 1
drwxrwxr-x 4 root ntadmin 96 May 5 10:12 .
drwxr-xr-x 6 root root 496 May 6 08:06 ..
drwxrwxr-x 3 root ntadmin 232 May 6 08:06 W32X86
drwxrwxr-x 3 root ntadmin 328 May 6 08:06 WIN40

./W32X86:
total 764
drwxrwxr-x 3 root ntadmin 232 May 6 08:06 .
drwxrwxr-x 4 root ntadmin 96 May 5 10:12 ..
drwxrwxr-x 2 root ntadmin 48 May 5 10:12 2
-rw-rw-r-- 1 root ntadmin 457600 May 6 08:06 ADOBEPS5.DLL
-rw-rw-r-- 1 root ntadmin 135680 May 6 08:06 ADOBEPSU.DLL
-rw-rw-r-- 1 root ntadmin 18451 May 6 08:06 ADOBEPSU.HLP
-rw-rw-r-- 1 root ntadmin 79913 May 6 08:06 P45DEVLAB.PPD
-rw-rw-r-- 1 root ntadmin 79913 May 6 08:06 P45DEVLAB2.PPD

./W32X86/2:
total 0
drwxrwxr-x 2 root ntadmin 48 May 5 10:12 .
drwxrwxr-x 3 root ntadmin 232 May 6 08:06 ..

./WIN40:
total 2374
drwxrwxr-x 3 root ntadmin 328 May 6 08:06 .
drwxrwxr-x 4 root ntadmin 96 May 5 10:12 ..
drwxrwxr-x 2 root ntadmin 48 May 5 10:12 0
-rw-rw-r-- 1 root ntadmin 575573 May 6 08:06 ADFONTS.MFM
-rw-rw-r-- 1 root ntadmin 1295840 May 6 08:06 ADOBEPS4.DRV
-rw-rw-r-- 1 root ntadmin 196460 May 6 08:06 ADOBEPS4.HLP
-rw-rw-r-- 1 root ntadmin 13492 May 6 08:06 DEFPRTR2.PPD
-rw-rw-r-- 1 root ntadmin 118128 May 6 08:06 ICONLIB.DLL
-rw-rw-r-- 1 root ntadmin 79913 May 6 08:06 P45DEVLAB.PPD
-rw-rw-r-- 1 root ntadmin 79913 May 6 08:06 P45DEVLAB2.PPD
-rw-rw-r-- 1 root ntadmin 57344 May 6 08:06 PSMON.DLL

./WIN40/0:
total 0
drwxrwxr-x 2 root ntadmin 48 May 5 10:12 .
drwxrwxr-x 3 root ntadmin 328 May 6 08:06 ..
DvPrntSvr:/var/lib/samba/drivers #

>Is root allowed to not only create subdirectories there, but also put
>files in?

If I "rm -r /var/lib/samba/drivers/*" followed by "rm ntprinters.tdb
printing.tdb ntdrivers.tdb" and "/etc/rc.d/smb restart" and then do
"cupsaddsmb -v -a -U root" (or do this per printer) it builds the above
file structure and returns the original errors. So, yes.

I also added root to the ntadmin group, to no avail

>Which are ownership and access rights for the location where your
>printing *.tdb files reside?

DvPrntSvr:/var/lib/samba # ls -la
total 94
drwxr-xr-x 6 root root 496 May 6 08:11 .
drwxr-xr-x 21 root root 552 May 5 09:30 ..
drwxr-xr-x 2 root root 800 May 5 09:01 bin
-rw------- 1 root root 696 May 5 10:45 brlock.tdb
-rw-r--r-- 1 root root 743 May 6 08:11 browse.dat
-rw-r--r-- 1 root root 8192 May 5 10:12 connections.tdb
drwxrwxr-x 4 root ntadmin 96 May 5 10:12 drivers
-rw------- 1 root root 8192 May 6 08:06 locking.tdb
-rw------- 1 root root 8192 May 5 09:27 messages.tdb
drwxr-xr-x 2 root root 48 Oct 14 2002 netlogon
-rw------- 1 root root 8192 May 5 10:45 ntdrivers.tdb
-rw------- 1 root root 696 May 5 10:45 ntforms.tdb
-rw------- 1 root root 8192 May 5 10:45 ntprinters.tdb
-rw------- 1 root root 8192 May 5 10:45 printing.tdb
drwxrwx--- 2 root users 48 Oct 14 2002 profiles
-rw------- 1 root root 8192 May 5 10:45 share_info.tdb
-rw-r--r-- 1 root root 24576 May 5 09:23 unexpected.tdb
DvPrntSvr:/var/lib/samba #

>What happens if you put manually all the files (ADOBEPS5.DLL,
>P45DEVLAB.PPD, ADOBEPSU.DLL, ADOBEPSU.HLP) into
>
> [print$]/W32X86/
>
>and then run the command
>
> rpcclient localhost -N -U'root%' -c 'adddriver
>"Windows NT x86"
"P45DEVLAB:ADOBEPS5.DLL:P45DEVLAB.PPD:ADOBEPSU.DLL:ADOBEPSU.HLP:NULL:RAW:NUL
L"'

those files are already there, but when done manually, nothing changes

> You can increase verbosity with the "-d" parameter:

I had debug set to 5 when I did the dump. I didn't notice anything
additional at higher levels.

> rpcclient localhost -d 3 -N -U'root%' -c 'adddriver "Windows
>NT x86"
>"P45DEVLAB:ADOBEPS5.DLL:P45DEVLAB.PPD:ADOBEPSU.DLL:ADOBEPSU.HLP:NULL:RAW:NU
LL"'
>
> rpcclient localhost -d 5 -N -U'root%' -c 'adddriver "Windows
>NT x86"
>"P45DEVLAB:ADOBEPS5.DLL:P45DEVLAB.PPD:ADOBEPSU.DLL:ADOBEPSU.HLP:NULL:RAW:NU
LL"'
>
>
>The man page says about the "rpcclient adddriver" command, that it
>takes two parameters:
>
> adddriver 
>
>The parameter consists of these 8 colon-separated fields:
>
> Long Printer Name:\
> Driver File Name:\
> Data File Name:\
> Config File Name:\
> Help File Name:\
> Language Monitor Name:\
> Default Data Type:\
> Comma Separated list of Files
>
>Any empty fields should be entered as the string "NULL".
>
>So the command seems to be the right one. (I remember a bug in
>one version of cupsaddsmb which had this messed up). Seems
>to be OK here.

Yeah, I did try to form the commands manually, to no avail.

>[ As a side note: what the man page calls the "Long Printer Name"
> should really be the "Driver Name". It may be set to any legal
> string. It is under your control to name the driver as you
> like. I believe it doesn't break anything. As long as you re-use
> that same name later in the "setdriver" command, this is allright...]
>
>> Running command: rpcclient localhost -N -U'root%' -c
>'adddriver "Windows 4.0"
>"P45DEVLAB:ADOBEPS4.DRV:P45DEVLAB.PPD:NULL:ADOBEPS4.HLP:PSMON.DLL:RAW:ADFON
TS.MFM,DEFPRTR2.PPD,ICONLIB.DLL"'
>> cmd = adddriver "Windows 4.0"
>"P45DEVLAB:ADOBEPS4.DRV:P45DEVLAB.PPD:NULL:ADOBEPS4.HLP:PSMON.DLL:RAW:ADFON
TS.MFM,DEFPRTR2.PPD,ICONLIB.DLL"
>
>Syntax is OK here too.
>
>> result was NT_STATUS_UNSUCCESSFUL
> >
>> Running command: rpcclient localhost -N -U'root%' -c
>'setdriver P45DEVLAB P45DEVLAB'
>> cmd = setdriver P45DEVLAB P45DEVLAB
>> Succesfully set P45DEVLAB to driver P45DEVLAB.
>> 
>> Running command: smbclient //localhost/print\$ -N -U'root% >removed>' -c
'mkdir W32X86;put /var/spool/cups/tmp/3eb694f6e7a75
>W32X86/P45DEVLAB2.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=158.184.44.107 bcast=158.184.45.255
>nmask=255.255.254.0
>> Domain=[BLACKFOREST] OS=[Unix] Server=[Samba 2.2.5]
>> NT_STATUS_OBJECT_NAME_COLLISION making remote directory \W32X86
>> putting file /var/spool/cups/tmp/3eb694f6e7a75 as \W32X86/P45DEVLAB2.PPD
>(13006.5 kb/s) (average 13006.7 kb/s)
>> putting file /usr/share/cups/drivers/ADOBEPS5.DLL as
>\W32X86/ADOBEPS5.DLL (16550.9 kb/s) (average 15906.5 kb/s)
>> putting file /usr/share/cups/drivers/ADOBEPSU.DLL as
>\W32X86/ADOBEPSU.DLL (14722.1 kb/s) (average 15652.7 kb/s)
>> putting file /usr/share/cups/drivers/ADOBEPSU.HLP as
>\W32X86/ADOBEPSU.HLP (9008.8 kb/s) (average 15350.8 kb/s)
>> 
>> Running command: smbclient //localhost/print\$ -N -U'root% >removed>' -c
'mkdir WIN40;put /var/spool/cups/tmp/3eb694f6e7a75
>WIN40/P45DEVLAB2.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=158.184.44.107 bcast=158.184.45.255
>nmask=255.255.254.0
>> Domain=[BLACKFOREST] OS=[Unix] Server=[Samba 2.2.5]
>> NT_STATUS_OBJECT_NAME_COLLISION making remote directory \WIN40
>> putting file /var/spool/cups/tmp/3eb694f6e7a75 as \WIN40/P45DEVLAB2.PPD
>(11148.4 kb/s) (average 11148.6 kb/s)
>> putting file /usr/share/cups/drivers/ADFONTS.MFM as \WIN40/ADFONTS.MFM
>(17565.0 kb/s) (average 16413.4 kb/s)
>> putting file /usr/share/cups/drivers/ADOBEPS4.DRV as \WIN40/ADOBEPS4.DRV
>(17100.9 kb/s) (average 16863.6 kb/s)
>> putting file /usr/share/cups/drivers/ADOBEPS4.HLP as \WIN40/ADOBEPS4.HLP
>(14758.0 kb/s) (average 16646.4 kb/s)
>> putting file /usr/share/cups/drivers/DEFPRTR2.PPD as \WIN40/DEFPRTR2.PPD
>(6587.6 kb/s) (average 16489.2 kb/s)
>> putting file /usr/share/cups/drivers/ICONLIB.DLL as \WIN40/ICONLIB.DLL
>(14419.7 kb/s) (average 16367.5 kb/s)
>> putting file /usr/share/cups/drivers/PSMON.DLL as \WIN40/PSMON.DLL
>(13999.7 kb/s) (average 16299.9 kb/s)
>> 
>> Running command: rpcclient localhost -N -U'root%' -c
>'adddriver "Windows NT x86"
>"P45DEVLAB2:ADOBEPS5.DLL:P45DEVLAB2.PPD:ADOBEPSU.DLL:ADOBEPSU.HLP:NULL:RAW:
NULL"'
>> cmd = adddriver "Windows NT x86"
>"P45DEVLAB2:ADOBEPS5.DLL:P45DEVLAB2.PPD:ADOBEPSU.DLL:ADOBEPSU.HLP:NULL:RAW:
NULL"
>> result was NT_STATUS_UNSUCCESSFUL
>> 
>> Running command: rpcclient localhost -N -U'root%' -c
>'adddriver "Windows 4.0"
>"P45DEVLAB2:ADOBEPS4.DRV:P45DEVLAB2.PPD:NULL:ADOBEPS4.HLP:PSMON.DLL:RAW:ADF
ONTS.MFM,DEFPRTR2.PPD,ICONLIB.DLL"'
>> cmd = adddriver "Windows 4.0"
>"P45DEVLAB2:ADOBEPS4.DRV:P45DEVLAB2.PPD:NULL:ADOBEPS4.HLP:PSMON.DLL:RAW:ADF
ONTS.MFM,DEFPRTR2.PPD,ICONLIB.DLL"
>> result was NT_STATUS_UNSUCCESSFUL
>> 
>> Running command: rpcclient localhost -N -U'root%' -c
>'setdriver P45DEVLAB2 P45DEVLAB2'
>> cmd = setdriver P45DEVLAB2 P45DEVLAB2
>> Succesfully set P45DEVLAB2 to driver P45DEVLAB2.
>
>This indicates that the registration of the driver data to
>the Samba TDB files succeeded. However the physical transfer
>of the files to the subdirecties doesn't take place.

Thats what I gathered, yeah.

Thanks for your efforts, I am still banging my head against it over here.
I'll read that HOWTO tomarrow morning.


/\/\/\/\/\/\ Nothing is foolproof to a talented fool. /\/\/\/\/\/\

coreyfro at coreyfro.com
http://www.coreyfro.com/
http://stats.distributed.net/rc5-64/psummary.php3?id=196879
ICQ : 3168059

-----BEGIN GEEK CODE BLOCK-----
GCS d--(+) s: a-- C++++$ UBL++>++++ P+ L+ E W+++$ N+ o? K? w++++$>+++++$
O---- !M--- V- PS+++ PE++(--) Y+ PGP- t--- 5(+) !X- R(+) !tv b-(+)
Dl++(++++) D++ G+ e>+++ h++(---) r++>+$ y++*>$ H++++ n---(----) p? !au w+
v- 3+>++ j- G'''' B--- u+++*** f* Quake++++>+++++$
------END GEEK CODE BLOCK------

Home of Geek Code - http://www.geekcode.com/
The Geek Code Decoder Page - http://www.ebb.org/ungeek//



More information about the samba mailing list