Setting up Print drivers in Samba

Hello,

So i’m trying to add windows print drivers to smb for them to be automatically downloaded to the client upon printer installation. I’ve followed the samba.org Printing documents which have been helpful to some degree. I have an HP printer and i’d like to just upload and register the .inf,.dll.cab files that the manufacture cd comes with for the client to use the .inf file to install the drivers from that location but i keep getting Werr_invalid_PARAM

here is the syntax of what i’m trying to do, can anyone help?

rpcclient -d 4 -U ‘username%password’ -c ‘adddriver “Windows NT x86” \
"HP_Color_LaserJet_3800:hpbicoin.dll:hpc3800c.inf:hpc3800c.cat:hpc3800c.cab:hpcp3800.cf_:p6i2arww.cab:p6i2caww.cab:p6i2csww.cab’ Server

On Tue April 26 2011 12:06 pm, timothysomalley wrote:

>
> Hello,
>
> So i’m trying to add windows print drivers to smb for them to be
> automatically downloaded to the client upon printer installation. I’ve
> followed the samba.org Printing documents which have been helpful to
> some degree. I have an HP printer and i’d like to just upload and
> register the .inf,.dll.cab files that the manufacture cd comes with for
> the client to use the .inf file to install the drivers from that
> location but i keep getting Werr_invalid_PARAM
>
> here is the syntax of what i’m trying to do, can anyone help?
>
>
>
> rpcclient -d 4 -U ‘username%password’ -c ‘adddriver “Windows NT x86”
>
> "HP_Color_LaserJet_3800:hpbicoin.dll:hpc3800c.inf:hpc3800c.cat:hpc3800c.cab:hpcp3800.cf_:p6i2arww.cab:p6i2caww.cab:p6i2csww.cab’
> Server
>
timothysomalley;

Did you run rpcclient a second time with “setdriver” subcommand?

See the section "Installing Drivers into [Print$]:
http://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/classicalprinting.html#id2627627

If the printer is first installed on a windows machine, there is an easy way
using the “Add Printer Wizard”, to download to your [PRINT$] share. This is
given in the first section of the above HOWTO. Here is another written for
SLES but it also works on any NIX system. See the section:
“Adding Windows Printer Drivers to the server” of
http://www.pcc-services.com/sles/samba5.html

I’ve found the “Add Printer Wizard” is the easiest way to get the Drivers into
[Print$]


P. V.
“We’re all in this together, I’m pulling for you.” Red Green

I too am having this issue. I believe my issue is permission related. On the windows machine at the run command I put \printserver1 and pull up the SUSE 11.4 machine. Browse to the printers and faxes folder. In that folder I have my two printers listed. As per the instructions I right click the printer and left click on properties, answer no to the prompt, go the the advanced tab. Here the “New Driver” button as well as all other options on the tab are grey’d out.

I can connect to the hidden print$ share and create folders/documents so I have permission to that folder. I’m just not seeing what permissions need to be changed on the SUSE box so that I can add the printer.

Any insight would be greatly appreciated.

Thanks
Joe
PS…I’m pretty new to Linux so please be explicit in your suggestion.

On Fri April 29 2011 01:06 pm, jcavallaro wrote:

>
> I too am having this issue. I believe my issue is permission related.
> On the windows machine at the run command I put \printserver1 and pull
> up the SUSE 11.4 machine. Browse to the printers and faxes folder. In
> that folder I have my two printers listed. As per the instructions I
> right click the printer and left click on properties, answer no to the
> prompt, go the the advanced tab. Here the “New Driver” button as well
> as all other options on the tab are grey’d out.
>
> I can connect to the hidden print$ share and create folders/documents
> so I have permission to that folder. I’m just not seeing what
> permissions need to be changed on the SUSE box so that I can add the
> printer.
>
> Any insight would be greatly appreciated.
>
> Thanks
> Joe
> PS…I’m pretty new to Linux so please be explicit in your suggestion.
>
>
Joe;

Do you have the SePrintOperatorPrivilege set for your user? See:

http://samba.org/samba/docs/man/Samba-HOWTO-Collection/rights.html

P. V.
“We’re all in this together, I’m pulling for you.” Red Green

Thank for the quick reply…

I’ve tried but unsuccessfully.

net -S server -U domadmin rpc rights grant \ ‘ARC\Domain Admins’ SeMachineAccountPrivilege

It tells me Invalid command: net rpc rights

I must have something wrong in the syntax…

Joe

oh…I’ve also tried

net rpc rights grant ‘ARC\Domain Admins’ \ SeMachineAccountPrivilege -S server -U domadmin

Result: Unable to find a suitable server for domain ARC

Joe

Got another step further…now I get a different error

Failed to grant privileges for ARC\Domain admins (NT_STATUS_NO_SUCH_PRIVILEGE)

On Fri April 29 2011 02:36 pm, jcavallaro wrote:

>
> Got another step further…now I get a different error
>
> Failed to grant privileges for ARC\Domain admins
> (NT_STATUS_NO_SUCH_PRIVILEGE)
>
jcavallaro;

Look here: http://www.pcc-services.com/sles/samba3.html

Example:


venxxx@ABC:~> net rpc rights grant 'mydomain\Domain Admins'
SeMachineAccountPrivilege -S ABC -U root
Enter root's password:
Successfully granted rights.

Note: The net command is on one line, it is only wrapped for posting

P. V.
“We’re all in this together, I’m pulling for you.” Red Green

Thanks again for the info. I was able to run the net rpc command substituting root for a domain admin and get a successful…not sure if I was supposed to use a domain admin or not. If not then I would have to create a user root on the domain.

I have read through the information on the link you provided. From what I’m understanding from it, the instructions are for Samba to act as the PDC. That is not the case for use. We’re using AD and SUSE needs to integrate with AD and authenticate against AD. I believe I have that piece working correctly as I can log onto the SUSE box using a user/password from AD.

Screen Shot
http://screencast.com/t/RfoKtSpUiv

On Mon May 2 2011 01:06 pm, jcavallaro wrote:

>
> Thanks again for the info. I was able to run the net rpc command
> substituting root for a domain admin and get a successful…not sure if
> I was supposed to use a domain admin or not. If not then I would have to
> create a user root on the domain.
>
> I have read through the information on the link you provided. From what
> I’m understanding from it, the instructions are for Samba to act as the
> PDC. That is not the case for use. We’re using AD and SUSE needs to
> integrate with AD and authenticate against AD. I believe I have that
> piece working correctly as I can log onto the SUSE box using a
> user/password from AD.
>
> Screen Shot
> http://screencast.com/t/RfoKtSpUiv
>
>
jcavallaro;

I’m afraid I’m not familiar with the AD environment and so this is a bit
theoretical. The example you posted and my reply involved the
right “SeMachineAccountPrivilege”. But I thought you wanted to add
printers, and so you need “SePrintOperatorPrivilige”. You only needed root
to run the “net rpc rights” command. The user you grant that right to should
now be able to add printer drivers to the Linux server.

P. V.
“We’re all in this together, I’m pulling for you.” Red Green

Sorry for the confusion. We do want to add printers and use the SUSE box as our new virtual print server. What I’m unsure of right now…do I need to create a user “root” in AD and then run the rpc command?

On Mon May 2 2011 04:06 pm, jcavallaro wrote:

>
> Sorry for the confusion. We do want to add printers and use the SUSE
> box as our new virtual print server. What I’m unsure of right now…do
> I need to create a user “root” in AD and then run the rpc command?
>
>
AFAIK, just set the printer privilege on SuSE. You need to use root to set
the privilege, but then the user named should have that right. But this is
AD, so I’m not positive.

P. V.
“We’re all in this together, I’m pulling for you.” Red Green

Thank you for the help. Uploading the drivers through a Windows Client was much easier. I had one final question. When on the Windows client to install the printer i had to connect as myself to the server. I’ve since rebooted the client machine. A user printed a job today, and it came accross as me on the server.

How do i set the print server up to not need credentials to be accessed and the driver installed? Will the below syntax do this for me?

/usr/sbin/adduser --system --disabled-password smbprint

I should clarify when i look at the cups server it shows the job printed as my user.

On Thu May 5 2011 07:36 pm, timothysomalley wrote:

>
> I should clarify when i look at the cups server it shows the job printed
> as my user.
>
>
timothysomalley;

Is this true of all Windows Users? I can not reproduce this behavior. User
<mydomain>&lt;username> appears in /var/log/cups/page_log as the user
<username> who created the print job. i.e different user names produce
different entries.

P. V.
“We’re all in this together, I’m pulling for you.” Red Green

Yes.
Furthermore i changed my password and the user gets access denied. I want anyone to be able to connect and print. will this help /usr/sbin/adduser --system --disabled-password smbprint

On Fri May 6 2011 04:06 pm, timothysomalley wrote:

>
> Yes.
> Furthermore i changed my password and the user gets access denied. I
> want anyone to be able to connect and print. will this help
> /usr/sbin/adduser --system --disabled-password smbprint
>
>
timothysomalley;

I don’t think the above will help any, your free to try. See man adduser.

Can you post the contents of the [global] and [printers] section
of /etc/samba/smb.conf. You may conceal any sensitive values with a
substitute (i.e. public IPs and Domains).

It might also help if you add the following to the [global] section
of /etc/samba/smb.conf


log level = 1 auth:3

This will log additional authorization information in /var/log/samba/log.smbd
(unless you’ve redirected the logs.) How does a user, other than yourself,
authenticate when accessing a samba share?

P. V.
“We’re all in this together, I’m pulling for you.” Red Green

Hi Guys…

Just wanted to add another update. I’ve gotten a bit further is my issue.

A couple of issues that I found -
smb.conf file needed to get changed - added
enable privileges=yes
hosts allow = 10.x.x.x/19 127.0.0.1

RPC command that worked for me:
net rpc rights grant domain\username SePrintOperatorPrivilege
net rpc rights grant domain\username SeMachineAccountPrivilege

New error says:
Unable to install HP Universal Printing PCL 5, Windows 2000 or XP, Intel driver. Access is denied.

My guess is this is a permissions issue to the folder in which the drivers are going to be installed to on the SUSE box.

Thanks
Joe

On Tue May 10 2011 02:06 pm, jcavallaro wrote:

> New error says:
> Unable to install HP Universal Printing PCL 5, Windows 2000 or XP,
> Intel driver. Access is denied.
>
> My guess is this is a permissions issue to the folder in which the
> drivers are going to be installed to on the SUSE box.
>
> Thanks
> Joe
>
Joe;

Samba must obey the Linux permissions. Make sure your user has write access
to /var/lib/samba/drivers (and subdirectories).

P. V.
“We’re all in this together, I’m pulling for you.” Red Green

Thanks…that did the trick. SAMBA said it was read only even though the properties of the folder said yes for NTAdmin. Changed Writeable to yes and we’re good. Thank you very much for all of the help. Now the long task of installing all of the printers and moving all of the users to our new Linux print server from the OOOOLLLDDDD Windows Print server.

Joe