Printer drivers push problem with samba

samba
cups

(Marcin) #1

Hi, I want to push drivers with samba.
command:
rpcclient localhost -U admin -c 'adddriver “Windows NT x86” “my-printer:pscript5.dll:my-printer.ppd:ps5ui.dll:pscript.hlp:NULL:RAW:pscript.ntf”'
gives:
WERR_ACCESS_DENIED
It seems admin has no rights to doing this what is discribed in:
Using the “net rpc rights” Utility part of https://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/rights.html
but i can’t grant this to admin, I issue command:
net -U admin -S localhost rpc rights grant ‘admin’ SePrintOperatorPrivilege
and get:
Failed to grant privileges for admin (NT_STATUS_ACCESS_DENIED)
When using root as user I get:
Bad SMB2 signature for message


Could not connect to server localhost
Connection failed: NT_STATUS_ACCESS_DENIED

Any advice appreciated. Cheers.


(Markus Neuberger) #2

Hello @dj_marian,

I tried it now and got the same error. I think it’s not a rights problem, because BUILTIN\Administrators has the needed privilege and admin is member of domain admins and domain admins is member of BUILTIN\Administrators:

[root@server ~]# net rpc rights list privileges SePrintOperatorPrivilege -U admin
Enter admin's password:
SePrintOperatorPrivilege:
  BUILTIN\Administrators

I tried to add printer drivers via print management from a Windows 10 client as described here:

https://wiki.samba.org/index.php/Setting_up_Automatic_Printer_Driver_Downloads_for_Windows_Clients

I can write to \\server\print$ but access denied, when trying to add a print driver or printer.

Printing works with client side drivers. Does anybody know how add print drivers to the samba server, so clients may download them when needed?


(Dale Cliett) #3

Although it wouldn’t be a Windows like auto install, a work around is just to create a shared folder with the drivers in it for your clients to download that way when they double click on your printer and it prompts them for the driver they will be able to browse to it.
It’s not as straight forward as Windows, but it’s not too difficult for the majority of typical users… especially if you create them a quick cheat sheet of instructions for the couple of extra steps.


(Marcin) #4

It’s a workaround but not a solution, sadly. Maybe someone knows what “rpc addriver” command does in samba which files are changed so maybe a permissions problem occurs. Maybe some files should have a linux group changed to “Domain Admins” ?


(Marc) #5

You can try if this makes any difference:

config setprop smb UseClientDriver no
signal-event nethserver-samba-update

(Marcin) #6

Thanks, and sorry I forgot mention I already did that.