Discussion:
[Samba] Howto delete printer driver for only one architecture?
Christoph Peus
2005-02-18 06:03:42 UTC
Permalink
Hello everybody,

we have a lot of printers shared by samba, which are still offering the old
"version 2" W32X86 style print drivers, though most of our clients have
been upgraded to w2k and above meanwhile. Therefore I would like to delete
these old drivers, but I don't know how to achieve this without deleting
the drivers for all architectures (with rpcclient -c "deldriver... ").
It seems that there's an rpcclient command missing from the SPOOLSS stuff.
Any hints?

If I delete the drivers for all architectures and afterwards add those
which I really need, what happens to the configuration data which had been
saved to ntprinters.tdb? Will it survive the deletion of the corresponding
drivers or do I have to repeat all the configuration?
Thank you!

Regards
Christoph
Gerald (Jerry) Carter
2005-02-18 08:56:22 UTC
Permalink
Christoph Peus wrote:
| Therefore I would like to delete these old drivers, but
| I don't know how to achieve this without
| deleting the drivers for all architectures

Use a windows 200 or later client. Browse to the
server's 'printers and faxes' folder.

Now File -> Server properties and got to the driver
tab. You can select the specific driver and architectures
there.




cheers, jerry
Christoph Peus
2005-02-18 17:30:06 UTC
Permalink
Post by Gerald (Jerry) Carter
| Therefore I would like to delete these old drivers, but
| I don't know how to achieve this without
| deleting the drivers for all architectures
Use a windows 200 or later client. Browse to the
server's 'printers and faxes' folder.
Now File -> Server properties and got to the driver
tab. You can select the specific driver and architectures
there.
Thanks for your quick reply, but it doesn't solve the problem for me,
because the "add" and "delete" buttons are grayed out (not usable) in this
context, though I logged in with admin rigths. (I hope so)
(Besides of that - a scriptable solution would be very helpfull, because I
have to do this for about 90 printers...)

Is there something special about using Windows Server 2003 for client os?

From my smb.conf:

[printers]
comment = All Printers
path = /var/spool/samba
browseable = no
public = yes
guest ok = yes
writable = no
printable = yes
printer admin = @bit

[print$]
comment = Printer Drivers
path = /etc/samba/drivers
create mask = 774
directory mask = 775
browseable = yes
guest ok = no
read only = yes
write list = ntroot

I logged in as user "ntroot" which is member of the "bit" group. Something
wrong with this?
Thanks!

Christoph
Gerald (Jerry) Carter
2005-02-18 19:16:23 UTC
Permalink
Christoph Peus wrote:
| Gerald (Jerry) Carter wrote:
|
|> | Therefore I would like to delete these old drivers, but
|> | I don't know how to achieve this without
|> | deleting the drivers for all architectures
|>
|> Use a windows 200 or later client. Browse to the
|> server's 'printers and faxes' folder.
|>
|> Now File -> Server properties and got to the driver
|> tab. You can select the specific driver and architectures
|> there.
|
| Thanks for your quick reply, but it doesn't solve
| the problem for me, because the "add" and "delete"
| buttons are grayed out (not usable) in
| this context, though I logged in with admin rigths. (I hope so)

If they are greyed out, you don't have admin rights. You have to
defined the 'printer admin' option in [global] to get things to work
well. And I realize that this is kind of a documentation bug.
Or you can use the SePrintOperatorPrivilege in Samba 3.0.11

| (Besides of that - a scriptable solution would
| be very helpfull, because I have to do this for
| about 90 printers...)

rpcclient $> deldriverex
Usage: deldriverex <driver> [arch] [version]







cheers, jerry
=====================================================================
Alleviating the pain of Windows(tm) ------- http://www.samba.org
GnuPG Key ----- http://www.plainjoe.org/gpg_public.asc
"I never saved anything for the swim back." Ethan Hawk in Gattaca
Christoph Peus
2005-02-18 21:50:41 UTC
Permalink
Post by Gerald (Jerry) Carter
|> | Therefore I would like to delete these old drivers, but
|> | I don't know how to achieve this without
|> | deleting the drivers for all architectures
|>
|> Use a windows 200 or later client. Browse to the
|> server's 'printers and faxes' folder.
|>
|> Now File -> Server properties and got to the driver
|> tab. You can select the specific driver and architectures
|> there.
|
| Thanks for your quick reply, but it doesn't solve
| the problem for me, because the "add" and "delete"
| buttons are grayed out (not usable) in
| this context, though I logged in with admin rigths. (I hope so)
If they are greyed out, you don't have admin rights. You have to
defined the 'printer admin' option in [global] to get things to work
well. And I realize that this is kind of a documentation bug.
Or you can use the SePrintOperatorPrivilege in Samba 3.0.11
Thanks a lot! With "printer admin" defined in the global section it works
as expected.

Christoph
Christoph Peus
2005-02-19 02:33:26 UTC
Permalink
Post by Gerald (Jerry) Carter
|> | Therefore I would like to delete these old drivers, but
|> | I don't know how to achieve this without
|> | deleting the drivers for all architectures
|>
|> Use a windows 200 or later client. Browse to the
|> server's 'printers and faxes' folder.
|>
|> Now File -> Server properties and got to the driver
|> tab. You can select the specific driver and architectures
|> there.
|
| Thanks for your quick reply, but it doesn't solve
| the problem for me, because the "add" and "delete"
| buttons are grayed out (not usable) in
| this context, though I logged in with admin rigths. (I hope so)
If they are greyed out, you don't have admin rights. You have to
defined the 'printer admin' option in [global] to get things to work
well. And I realize that this is kind of a documentation bug.
Or you can use the SePrintOperatorPrivilege in Samba 3.0.11
I fear that I have reported success a little bit to hastily, because I
accidentlly tested your solution with a printer driver which was not in use
by any printer at this time. This indeed worked fine, but when I try to
delete a driver which is still associated to a printer, Windows is
complaining that the driver is in use and therefore cannot be deleted.

The same problem with rpcclient:

lunkwill root # rpcclient localhost -U ntroot -c 'deldriverex mathe9102
"Windows NT x86" 2'
Password:
Failed to remove driver mathe9102 for arch [Windows NT x86] (version: 2):
WERR_PRINTER_DRIVER_IN_USE
result was WERR_UNKNOWN_PRINTER_DRIVER

Samba (3.0.11) seems to behave different here than a "real" Windows printer
server: using Windows you can delete as many different architecture
specific drivers as you like, even when they are associated to an existing
printer - as long as there's at least one architecture's driver left for
the printer. This concept makes perfect sense to me.
With samba it seems that all architecture's drivers are "in use" as long as
they are associated to a printer and therefore cannot be deleted as long as
the printer exists.

Or do I get something wrong here?

Christoph
Gerald (Jerry) Carter
2005-02-19 22:19:38 UTC
Permalink
Post by Christoph Peus
Samba (3.0.11) seems to behave different here than a "real" Windows
printer server: using Windows you can delete as many different
architecture specific drivers as you like, even when they are associated
to an existing printer - as long as there's at least one architecture's
driver left for the printer. This concept makes perfect sense to me.
With samba it seems that all architecture's drivers are "in use" as long
as they are associated to a printer and therefore cannot be deleted as
long as the printer exists.
Yeah. I would agree there's a bug in there. Mind filing a bug report for
me? :-)







cheers, jerry
=====================================================================
Alleviating the pain of Windows(tm) ------- http://www.samba.org
GnuPG Key ----- http://www.plainjoe.org/gpg_public.asc
"I never saved anything for the swim back." Ethan Hawk in Gattaca
Christoph Peus
2005-02-20 17:57:46 UTC
Permalink
Post by Gerald (Jerry) Carter
Post by Christoph Peus
Samba (3.0.11) seems to behave different here than a "real" Windows
printer server: using Windows you can delete as many different
architecture specific drivers as you like, even when they are associated
to an existing printer - as long as there's at least one architecture's
driver left for the printer. This concept makes perfect sense to me.
With samba it seems that all architecture's drivers are "in use" as long
as they are associated to a printer and therefore cannot be deleted as
long as the printer exists.
Yeah. I would agree there's a bug in there. Mind filing a bug report for
me? :-)
Done. -> https://bugzilla.samba.org/show_bug.cgi?id=2363

I filed another one for the documentation kind of bug '"printer admin"
parameter has to be defined in the [global] section' as well.
-> https://bugzilla.samba.org/show_bug.cgi?id=2364

Thanks for your support!

Christoph

Continue reading on narkive:
Search results for '[Samba] Howto delete printer driver for only one architecture?' (Questions and Answers)
11
replies
I have Windows Vista, I'm trying to install my XP Disk but It wont let me.?
started 2008-04-12 16:22:17 UTC
software
Loading...