# HOWTO - Samba & CUPS 6.0 Windows Postscript Drivers

## atdsm

There are several methods for accessing Linux printers from Windows machines via CUPS and Samba. These methods have been outlined very well in this post. This HOWTO is intended for people who want to use the latest CUPS postscript driver (version 6.0) for accessing *nix [/list]computers from Windows, but don't know how to set it up. It isn't quite the same as before!

Assumptions

This HOWTO assumes that:

You already have CUPS installed and working with a printer that you have set up locally

You already have a Samba server installed and working on your network, and your windows machines can see your Samba server.

If you haven't got these things done yet, first install CUPS and SAMBA. This CUPS HOWTO (also mentioned above) will walk you through most of the necessary steps. BUT WATCH OUT, the methods outlined in daff's howto will not work exactly the same for the CUPS 6.0 drivers (which is why you need this HOWTO)!

Background

On April 19th, 2006, CUPS released the 6.0 version of their Windows Postscript driver. According to the cuppsaddsmb manpage (which I will talk about later), "The CUPS printer driver is preferred over the Adobe and Microsoft drivers since it supports the page-label, job-billing, and job-hold-until options fully on all printers."

Steps we will take

Pre1 - Install Samba

Pre2 - Install & Configure CUPS for your printer

1 - Obtain the Microsoft Postscript drivers that CUPS needs

2 - Obtain the CUPS 6.0 Windows drivers

3 - Copy the drivers to /usr/share/cups/drivers/

4 - Configure Samba correctly for using and distributing the CUPS drivers

5 - Use the cupsaddsmb script to install the CUPS drivers

6 - Restart Samba

7 - Install & test the printer from a Windows machine

You should have completed steps Pre1 and Pre2 before starting this howto. In other words, you should already have a printer installed and printing locally on your Linux computer and you should already have Samba installed and running.

Step 1: Obtain the Microsoft Postscript drivers that CUPS needs

The 6.0 CUPS Windows drivers rely on some existing Microsoft driver files in order to work correctly. Specifically, CUPS needs the following Microsoft files:

ps5ui.dll

pscript.hlp

pscript.ntf

pscript5.dll

This information can be found in the man pages for cupsaddsmb. An online version is here.

To obtain these files you will need access to a Windows XP computer. Once you are in front of a Windows XP computer, there is an easy way and a hard way to get the files.

The easy way

The easy way only works if by some chance Windows XP has already installed the Microsoft Postscript driver. In such a case, all you have to do is find and copy the files. The four files you need are located in the following folder:

```
C:\WINDOWS\system32\spool\drivers\w32x86\3
```

Copy them from there to you Linux computer. For now, just store them... we'll get to their final destination in a minute.

The hard way

If you went to the directory given above and didn't find the files already there, then you must trick Windows XP into installing them for you so that you can copy them out. To do this, you must "install" a printer which uses the Microsoft postscript driver. This will cause Windows to install the driver files, which will then let you go back to the easy way of just copying and pasting the files you need.

To trick Windows into installing the Microsoft Postscript driver:

1. Go to Settings: Printers and Faxes

2. Under "Printer Tasks" select "Add a Printer" (or do "File" -> "Add Printer")

3. Click "Next" to get to the second Wizard step

4. Select the option "Local printer attached to this computer" and uncheck the box "Automatically detect and install my Plug and Play printer"

5. Click "Next"

6. Select the LPT1 port (I don't think this matters much which port), then click "Next"

7. Under "Manufacturer" select "Apple" and under "Printer" select "Apple LaserWriter II NT v47.0"

NOTE: You can select any printer that uses the Microsoft postscript driver at this step. I just used the Apply LaserWriter because I know it works. If you don't see the exact string I gave above, try something similar... also let me know, b/c I want to find a printer that you can get to on all XP machines!

8. Click "Next" three times, taking note of the name. (The default printer bit won't matter; neither does the sharing.)

9. When you get to the "Do you want to print a test page?" part of the wizard (it should be after three clicks), select the "No" option, then click "Next"

10. Click "Finish"

At this point, you should see some file copying going on as Windows installs the driver.

When all this is done, go back and copy the four files that you need from

```
C:\WINDOWS\system32\spool\drivers\w32x86\3
```

 as described in the easy way above.

NOTE: You may also wish to go back and delete your newly installed fake Apple printer from the Windows XP Printers and Faxes settings box. To do this, right click the fake printer and select "Delete." Doing this will unclutter your Printers and Faxes dialogs, but it won't uninstall the hard-earned driver files we just got.

Step 2: Obtain the CUPS 6.0 Windows drivers

To do this step, you need to be on your Linux machine.

1. Download the CUPS driver files from http://www.cups.org/windows/software.php?6.0. For this particular HOWTO, I'm going to assume that you downloaded the version called "cups-windows-6.0-source.tar.bz2."

2. Using your favorite unzipping program, extract the entire tarball to the location of your choice. I usually use file-roller, because I can never remember all the options to append to tar. So, for example:

```
deepthought ~ # file-roller cups-windows-6.0-source.tar.bz2 &
```

3. Go to the "cups-windows-6.0" directory that was just created.

4. Go to the "i386" folder. The contents of this folder should look something like this:

```
deepthought cups-windows-6.0 # cd i386/

deepthought i386 # ls

cups6.inf  cups6.ini  cups6.ppd  cupsps6.dll  cupsui6.dll
```

Ok, now we're ready to move on to step 3...

Step 3: Copy the drivers to /usr/share/cups/drivers/

At this point, you should have found both the required Microsoft drivers/files:

ps5ui.dll

pscript.hlp

pscript.ntf

pscript5.dll

and the CUPS drivers/files:

cups6.ini

cupsui6.dll

cupsps6.dll

in the previous two steps (respectively).

Now that you know where these 7 files are, copy them all to 

```
/usr/share/cups/drivers/
```

(You may have to create this directory if it doesn't yet exist.)

Important: once these files are in /usr/share/cups/drivers/, they must be named exactly as they appear above, including capitalization. If any of the files are uppercase, change them to lowercase as they appear here. Otherwise, step 5 will fail silently, leaving you wondering what happened. For more information, see the cupsaddsmb man page.

NOTE: Older versions of the cupsaddsmb man page will tell you that only six files are required, omitting cups6.ini. I ran into this problem and it caused a frustrating failure of step 5 until I figured out what was going on. Fortunately, the latest online man pages do list cups6.ini as a required file. In addition, both the old and new versions of the cupsaddsmb man pages incorrectly state that you need cupsdrv6.dll, when really what you need is cupsps6.dll. There is no such thing as cupsdrv6.dll

Step 4: Configure Samba correctly for using and distributing the CUPS drivers

There is already a lot of information about how to do this, so I will only cover it briefly here. For more information, try daff's CUPS howto, the SAMBA HOWTO, or the CUPS admin documentation. (Note, however, that most of this other documentation is outdated and does not describe how to install the 6.0 windows drivers... hence this howto.)

To use Samba with CUPS, Samba must be (a) installed, and (b) have CUPS support built in. I'm going to assume that (a) and (b) are true. If they aren't, try one of those other posts I mentioned before continuing.

To get Samba to cooperate with CUPS, we need the following lines in /etc/samba/smb.conf:

```
[global]

load printers = yes

printing = cups

printcap name = cups

[printers]

comment = All Printers

path = /var/spool/samba

browseable = no

public = yes

guest ok = yes

writable = no

printable = yes

printer admin = root

[print$]

comment = Printer Drivers

path = /etc/samba/drivers

browseable = yes

guest ok = no

read only = yes

write list = root

```

I got this directly from the CUPS documentation. Note that the comments have been stripped and irrelevant parts of the config removed. Please only modify the parts of your config corresponding to what you see above.

This particular setup makes all local CUPS printers available to Samba, and tells Samba to look in /etc/samba/drivers for Windows drivers. It also makes root the only valid printer administrator. If you want to change this config, go ahead, but be sure you know what you are doing.  :Wink: 

One more thing: root must have a Samba password in order for the next step to work. If root doesn't yet have a password in Samba (or if you just want to make sure), do the following:

```
deepthought ~ #smbpasswd -a root
```

and enter a new password for root when it is requested.

Step 5: Use the cupsaddsmb script to install the CUPS drivers

NOTE: If steps 3 and 4 haven't been completed exactly right, then this will fail silently or with a bunch of on-screen errors. If this happens, go back and double-check that you have all 7 of the files you need and that they are named properly.

To run this step, samba and cups must be running (if they aren't already):

```
deepthought ~ # /etc/init.d/cupsd start

 * Starting cupsd ...                                                     [ ok ]

deepthought ~ # /etc/init.d/samba start

 * samba -> start: smbd ...                                               [ ok ]

 * samba -> start: nmbd ...                                               [ ok ]

```

Ok, now run the following command:

```
deepthought ~ # cupsaddsmb -U root -a
```

This command runs the cupsaddsmb script to install postscript drivers to Samba for all known CUPS printers. It will ask for your root password, then spit a bunch of crap on the screen, terminating (hopefully) with a message that says something like "Successfully set _printername_ to driver _printername_."

To double check that everything worked, go to the /etc/samba/drivers/ folder. If you do an ls, you should see that the drivers have been installed successfully in a complicated directory structure. For example...

```
deepthought ~ # ls /etc/samba/drivers/

W32X86

deepthought ~ # ls /etc/samba/drivers/W32X86/

3

deepthought ~ # ls /etc/samba/drivers/W32X86/3/

PS8250.ppd  cupsps6.dll  ps5ui.dll    pscript.ntf

cups6.ini   cupsui6.dll  pscript.hlp  pscript5.dll
```

In this case, you see the 7 files from before plus PS8250.ppd - the ppd driver file specific for my printer (a PhotoSmart 8250). You should see the 7 files plus one or more ppds for your printers.

Important: the cupsaddsmb script does more than just copying the driver files over to this directory structure. It also registers the drivers with Samba. If the cupsaddsmb script fails, please realize that creating the /etc/samba/driver directory structure by hand will not work. If you need more information, read the exceedingly complicated Samba documentation here.

Step 6: Restart Samba

This step is quick but necessary in order for Samba to start using the new config files.

```
deepthought ~ # /etc/init.d/samba restart
```

Step 7: Install & test the printer from a Windows machine

Note: the CUPS 6.0 drivers only work with Windows XP, 2000, and NT. If you have 98 or ME, you'll have to use Adobe's drivers. For more information on that, see the other HOWTO's I've been referring to.

Let's use Windows XP as the example, since it's the most common case.

1. Using file explorer, browse to the Samba share that has your newly installed printer. In my case, I go to explorer and type in:

```
\\deepthought
```

2. Double click on "Printers and Faxes." 

3. You should now be looking at a screen which shows your newly installed Samba printers. Right click on the printer of your choice and select "Connect..."

4. When you get a warning about Windows being about to connect and download printer drivers for you, click "Yes" to continue.

5. That's it! Your Samba printer is now installed on Windows XP using the latest CUPS drivers.

You probably want to test your printer now too. To do that:

1. Open "Printers and Faxes"

2. Right-click the new printer and select "Properties"

3. On the "General" tab, click "print test page"

Final Comments

For me, the hardest part of this whole thing was getting the Microsoft postscript drivers in the first place. It wasn't until I found this random site which helped me figure out how to trick Windows into installing the proper drivers.

The second hardest thing was knowing which files I needed. As I mentioned above in a note, only the latest man page for cupsaddsmb mentioned cups6.ini. Older versions of the man page as well as almost all other documentation I have seen don't mention cups6.ini at all. As a result, I totally missed it the first time, and was pulling my hair out trying to figure out why cupsaddsmb was failing. Finally, I just copied all the files I could find into /usr/sare/cups/driver and tried again, which is how I found out that I needed cups6.ini. Later, a look at the latest cupsaddsmb man page online told me that I was correct in guessing that cups6.ini was needed after all.

That's it! Please let me know if you have corrections or suggestions. Also let me know if it works. That would be really cool.  :Smile: 

---------------------------------------------------------------------------

Additional Notes/Changelog - In Response to Feedback

23-Apr-2006: thesnowman pointed out that there was an error in step 3. I had incorrectly said to copy a file called "cupsdrv6.dll," when in fact the file you are supposed to copy is called "cupsps6.dll." I fixed the error.

The source of the error is the cupsaddsmb man page, which incorrectly names "cupsdrv6.dll" as a necessary file. As far as I can tell, the file "cupsdrv6.dll" doesn't actually exist... not sure why the documentation talks about it.

----------

## thesnowman

Thanks - this will come in very handy.

I think there is a typo in step 3.  You say to copy a CUPS file called cupsdrv6.dll, however this does not exist.  There are only two dlls in the i386 directory so I think it should be cupsps6.dll.

I'll let you know once I've set this up on a real system..

----------

## atdsm

 *thesnowman wrote:*   

> I think there is a typo in step 3.  You say to copy a CUPS file called cupsdrv6.dll, however this does not exist.  There are only two dlls in the i386 directory so I think it should be cupsps6.dll.

 

Indeed. Thanks for catching that. The error comes from the man page for cupsaddsmb, which (aparently incorrectly) specifies the need for a file called "cupsdrv6.dll." You are right, I don't have a file called that. The only other file I have is "cupsps6.dll," and everything works for me.

I'll correct the HOWTO and put in a note about that.

----------

## ivanchf

Thx very much.

This guide is really very clear~ i wonder how can you work out this, it's amazing!

I have install my samsung ml1610 and share to the window clients successfully.

The name of the files are troubles, some are capital letters and some are small letters..........

unfortunily i can't find out this at the first time..................

----------

## weyer

Thank You !!

However, i had to extend the cupsaddsmb command to the following to make it work : 

```
 cupsaddsmb -H weyerpuut -U root -h weyerpuut -a -v
```

i needed both the samba-server and cups-server name in the command (found in one of the mentioned howto's). 

Otherwise, i had the following about (which kept coming with different values here and there)

```
Unable to copy Windows 2000 printer driver files (1)!

Running command: smbclient ///var/run/cups/cups.sock/print$ -N -A /var/spool/cups/tmp/449bfe3fcdd30 -c 'mkdir W32X86;put /var/spool/cups/tmp/449bfe38c45a6 W32X86/LexmarkE220.ppd;put /usr/share/cups/drivers/ps5ui.dll W32X86/ps5ui.dll;put /usr/share/cups/drivers/pscript.hlp W32X86/pscript.hlp;put /usr/share/cups/drivers/pscript.ntf W32X86/pscript.ntf;put /usr/share/cups/drivers/pscript5.dll W32X86/pscript5.dll'

Connection to  failed

```

*edit*

the cupsaddsmb command worked, the printer is viewable in windows, but if i pick 'connect' it keeps complaining about the server not having the right drivers.  ... Under linux the printer works ... Lexmark E220 (althought with a ppd-file originally for macintosh)

When i continue ('search for correct driver') the message says i should look for a '.inf' file  my samba.conf (relevant) is this:

```

[global]

  netbios name = WEYERPUUT

  workgroup = LAN

  hosts allow = ALL

  printcap name = cups

  load printers = yes

  printing = cups

  map to guest = bad user

 security = user

 smb passwd file = /etc/samba/private/smbpasswd

 domain master = yes

 preferred master = yes

[printers]

   comment = All Printers

   path = /var/spool/samba

   browseable = no

   guest ok = yes

   writable = no

   printable = yes

   public = yes

#   printer name = LexmarkE220

   printer admin = root

# =====================================

# print command: see above for details.

# =====================================

;   print command = lpr-cups -P %p -o raw %s -r   

            # using client side printer drivers.

   print command = lpr-cups -P %p %s

   # using cups own drivers (use generic PostScript on clients).

# The following two commands are the samba defaults for printing=cups

# change them only if you need different options:

;   lpq command = lpq -P %p

;   lprm command = cancel %p-%j

[print$]

   comment = Printer Drivers

   # this path holds the driver structure

   path = /etc/samba/drivers

   browseable = yes

   read only = yes

   write list = root

   guest ok = no

```

----------

## atdsm

Hmm, not sure what might be happening with cupsaddsmb, unless you have multiple cups servers or samba servers running?

As for your printer not working in XP, I'm really not sure there. Since everything is being fed through Linux, it shouldn't matter what printer is connected; if it works in Linux it should work in Windows. Do you inadvertantly have your printing options set to RAW or something like that? If XP thinks it is printing directly to the printer and not through CUPS it would have problems. But I'm not sure how to begin troubleshooting that.

Steve

----------

## Unlucky_Alf

How do I update my 5.0 drivers to 6.0? Can I just delete the old driver files and follow this howto or do I have to uninstall the old drivers first?

----------

## atdsm

Yes. That's what I did anyway. But by this point the 6.0 stuff might be in portage - I haven't checked.

----------

## jeanfrancis

Hi there!

I follow the howto but...

when I run cupsaddsmb, the first part is working well, but at the rpcclient command, I get a WERR_INVALID_PARAM... !

I don't understand why... any idea?

----------

## atdsm

rpcclient? Which part are you in?

Keep in mind that the last time I did this was in April, so things may have changed since then. I don't really have time to run it again to make sure the howto is up to date... and I don't fully remember what all the terminology was in the first place. I don't actually remember having to do anything specifically with rpcclient, and it isn't mentioned in my howto. Where is that from?

----------

## devsk

Is the reverse possible? i.e. print onto windows XP from linux. I have a printer which I don't have linux drivers for. I shared it from windows XP and is accessible from linux and win xp from within vmware. I have always wondered if I could print from my linux box. But I could never get it working. Is it possible to achieve it with some of the drivers you talk about here?

----------

## atdsm

As far as I know, the whole CUPS/Samba thing is just designed to use a printer on Linux from Windows. There may be a way to use Samba to access printers as well, but I'm not familiar with it as I've never tried that.

----------

## jeanfrancis

atdsm:

I'm not having the same trouble anymore since I tried lots and lots of things and broke everything  :Wink:   It's like if the cupsaddsmb command was "not in sync" with the rpcclient one...

I will try to use the Windows drivers to print to the shared printer. I'm now able to connect to it but I receive a message saying it couldn't add a print job... I'll look on my cups conf.

Thanks

----------

## thunder7

I have problem with cupsaddsmb and I do not know what to do:( I suppose it is quite easy to solve it but I have no ideas. W[/code]hen I want to use: cupsaddsmb -H printserver -U root -h printserver -v epson ,it gives:

```
Password for root required to access localhost via SAMBA:

Running command: rpcclient localhost -N -U'root%' -c 'adddriver "Windows NT x86" "epson:pscript5.dll:epson.ppd:ps5ui.dll:pscript.hlp:NULL:RAW:pscript5.dll,epson.ppd,ps5ui.dll,pscript.hlp,pscript.ntf,cups6.ini,cupsps6.dll,cupsui6.dll"'

failed session setup with NT_STATUS_LOGON_FAILURE

Cannot connect to server.  Error was NT_STATUS_LOGON_FAILURE

```

Please help me, thanx a lot

----------

## darkphader

 *thunder7 wrote:*   

> 
> 
> ```
> Password for root required to access localhost via SAMBA:
> 
> ...

 

Did you add root as a samba user and set the password?

You should also be able to provide the password in the argument; instead of "-U root" use "-U root%password".

Also it should be emphasized that these are postscript drivers and that you need a postscript capable printer with the proper PPD file. If you're not using a PS printer it is probably best to set up a RAW print queue in CUPS and use the native Windows drivers.

----------

## thunder7

thanx i solved my problem, I have in my smb.conf disable spools = yes that is why cupsaddsmb didn't want  to work properly. I have used native windows drivers, but it worked much more slower than now

----------

## JROCK2004

ok when I do cupsaddsmb -U root -a it asks for my root passwd and I enter it. then goes to next prompt

localhost i386 # cupsaddsmb -U root -a

Password for root required to access localhost via SAMBA:

localhost i386 #

any ideas?

----------

## JROCK2004

I would like to add that if you have an HP all in one device and in windows you see the share printer and is complains about drivers. you can tell the printer to use 990c drivers and it will work.

----------

## Centinul

I got all the way to the end of the tutorial. When windows tried to install the drivers it said that it couldn't find them? What's the deal? I checked /etc/samba/drivers and all the ones that should be there are... damn I have CUPs and SAMBA...

----------

## atdsm

I'm not sure what the problem would be. Is the printer you are using is in CUPS and have you succesfully printed from Linux? The only other thing I can think of to ask is what version of Windows you are running. The CUPS drivers only work with XP or 2000...

----------

## Centinul

I solved the problem. I had commented out the section in smb.conf that defined my printer. (not the printers and print$ sections). Once I uncommented that section out I have been able to print from windows. 

atdsm -- Thanks for all the help. I've been trying for a long time to get this to work  :Smile: 

----------

## atdsm

No problem. I just hope this is up to date enough to be useable; I haven't reinstalled a samba printer since April.

----------

## thesnowman

 *atdsm wrote:*   

> No problem. I just hope this is up to date enough to be useable; I haven't reinstalled a samba printer since April.

 

Yeah it still works.  I setup a dapper server using these instructions about a month ago.

One thing I can't figure out that I'd like to know is how to remove printers from samba.  If anyone knows, please reply to this thread.

----------

## max-232

Hi all,

I have a problem with my configurations.....

I've followed various guides, principally http://www.gentoo.org/doc/it/quick-samba-howto.xml but I can get it working.

my problem is this

 *Quote:*   

> 
> 
> Paperone samba # cupsaddsmb -U root -v PSC-1215
> 
> Password for root required to access /var/run/cups/cups.sock via SAMBA: 
> ...

 

I have both cups-samba-5.... and cups-windows-6... installed in /usr/share/cups/drivers

I've also tried with the "-H" and "-h" options and tried to modify the security to user....but I have this error!

I can't figure it out!!!!

Help needed!!!

Thanks in advance

Massimo

----------

## Unlucky_Alf

 *Unlucky_Alf wrote:*   

> How do I update my 5.0 drivers to 6.0? Can I just delete the old driver files and follow this howto or do I have to uninstall the old drivers first?

 

I found out that it's possible (and may be a good thing) to delete the old drivers from the server's list of installed drivers. It must be done before deleting the driver files, because once the files are deleted the drivers can't be deleted from the list.

1. connect to the Samba server

```
rpcclient <server> -U root
```

2. List available drivers

```
rpcclient $> enumdrivers
```

3. Delete driver

```
rpcclient $> deldriver <drivername>
```

4. Exit

```
rpcclient $> exit
```

5. Delete the driver files in /etc/samba/printer

----------

## MorphiusFaydal

When I follow this; I get:

```

Unable to copy Windows 2000 printer driver files (1)!

Running command: smbclient //localhost/print$ -N -A /var/spool/cups/tmp/46d33448180b1 -c 'mkdir W32X86;put /var/spool/cups/tmp/46d33421b4134 W32X86/HL-2040.ppd;put /usr/share/cups/drivers/ps5ui.dll W32X86/ps5ui.dll;put /usr/share/cups/drivers/pscript.hlp W32X86/pscript.hlp;put /usr/share/cups/drivers/pscript.ntf W32X86/pscript.ntf;put /usr/share/cups/drivers/pscript5.dll W32X86/pscript5.dll'

```

I'm running:

```

cupsaddsmb -H localhost -U root -h localhost -v HL-2040

```

----------

## atdsm

I'm sorry; I haven't worked with these drivers in over a year now. I don't even know what version they're up to; this HOWTO may very well be obsolete.

----------

## MorphiusFaydal

6.0 is still the latest.

----------

## echto

```
 

Unable to copy Windows 2000 printer driver files (1)!

Running command: smbclient ///var/run/cups/cups.sock/print$ -N -A /var/spool/cups/tmp/449bfe3fcdd30 -c 'mkdir W32X86;put /var/spool/cups/tmp/449bfe38c45a6 W32X86/LexmarkE220.ppd;put /usr/share/cups/drivers/ps5ui.dll W32X86/ps5ui.dll;put /usr/share/cups/drivers/pscript.hlp W32X86/pscript.hlp;put /usr/share/cups/drivers/pscript.ntf W32X86/pscript.ntf;put /usr/share/cups/drivers/pscript5.dll W32X86/pscript5.dll'

Connection to  failed 

```

Make sure your 'write list' contains a valid user such as 'root'.

```

[print$]

comment = Printer Drivers

path = /etc/samba/drivers

guest ok = no

browseable = yes

read only = yes

write list = root

```

----------

## MorphiusFaydal

 *echto wrote:*   

> 
> 
> ```
>  
> 
> ...

 

Yes.

```
Running command: smbclient //localhost/print$ -N -A /var/spool/cups/tmp/47095a8c44379 -c 'mkdir W32X86;put /var/spool/cups/tmp/47095a8642f4e W32X86/HL-2040.ppd;put /usr/share/cups/drivers/ps5ui.dll W32X86/ps5ui.dll;put /usr/share/cups/drivers/pscript.hlp W32X86/pscript.hlp;put /usr/share/cups/drivers/pscript.ntf W32X86/pscript.ntf;put /usr/share/cups/drivers/pscript5.dll W32X86/pscript5.dll'

Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.0.24]

Server not using user level security and no password supplied.

NT_STATUS_NETWORK_ACCESS_DENIED making remote directory \W32X86

Failed to open \W32X86/HL-2040.ppd: NT_STATUS_OBJECT_PATH_NOT_FOUND

Failed to open \W32X86/ps5ui.dll: NT_STATUS_OBJECT_PATH_NOT_FOUND

Failed to open \W32X86/pscript.hlp: NT_STATUS_OBJECT_PATH_NOT_FOUND

Failed to open \W32X86/pscript.ntf: NT_STATUS_OBJECT_PATH_NOT_FOUND

Failed to open \W32X86/pscript5.dll: NT_STATUS_OBJECT_PATH_NOT_FOUND

Unable to copy Windows 2000 printer driver files (1)!
```

Is what I'm getting now.

Here's my smb.conf:

```

[global]

        workgroup = Workgroup

        netbios name = REMUS

        server string = Remus (Samba Server %v)

        security = share

        preferred master = yes

        socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192

#       vfs object = vscan-clamav

#       vscan-clamav: config-file = /etc/samba/vscan-clamav.conf

        printcap name = cups

        printing = cups

        load printers = yes

[public]

        comment = Public files

        path = /home/samba/public

        read only = no

        writeable = yes

        guest ok = yes

[print$]

        comment = Printer drivers

        path = /etc/samba/printer

        guest ok = yes

        browseable = yes

        read only = yes

        write list = root

[HL-2040]

        comment = Brother HL-2040 Series

        printable = yes

        path = /var/spool/samba

        public = yes

        guest ok = yes

        printer admin = root

[printers]

        comment = All Printers

        browseable = no

        printable = yes

        writeable = yes

        public = yes

        guest ok = yes

        path = /var/spool/samba

        printer admin = root

        write list = root
```

----------

## darkphader

Are you using Gentoo? And emerge to install Samba?

If so it might behoove you to use the paths that are already properly setup by the ebuild. Look at the example smb.conf that is provided, zoom in on the print$ share and you may begin to see the problem.

Chris

----------

## MorphiusFaydal

 *darkphader wrote:*   

> Are you using Gentoo? And emerge to install Samba?
> 
> If so it might behoove you to use the paths that are already properly setup by the ebuild. Look at the example smb.conf that is provided, zoom in on the print$ share and you may begin to see the problem.
> 
> Chris

 

Can you copy that here, I believe I deleted mine.  Or at least; it's not in /etc/samba not /usr/share/doc/samba-3.0.24-r3

----------

## darkphader

 *MorphiusFaydal wrote:*   

> Can you copy that here, I believe I deleted mine.  Or at least; it's not in /etc/samba not /usr/share/doc/samba-3.0.24-r3

 

It's smb.conf.example in /etc/samba/ - just remerge samba or untar the corresponding gentoo package.

----------

## MorphiusFaydal

Okay; here's the relevant section in the example conf:

```
[print$]

   path = /var/lib/samba/printers

   browseable = yes

   read only = yes

   write list = @adm root

   guest ok = yes
```

And here's mine now:

```
[print$]

        comment = Printer drivers

        path = /var/lib/samba/printers

        guest ok = yes

        browseable = yes

        read only = yes

        write list = @adm root
```

SO!

Here's the now-current error:

```
Running command: smbclient //localhost/print$ -N -A /var/spool/cups/tmp/47099c564cd1d -c 'mkdir W32X86;put /var/spool/cups/tmp/47099c5263030 W32X86/HL-2040.ppd;put /usr/share/cups/drivers/ps5ui.dll W32X86/ps5ui.dll;put /usr/share/cups/drivers/pscript.hlp W32X86/pscript.hlp;put /usr/share/cups/drivers/pscript.ntf W32X86/pscript.ntf;put /usr/share/cups/drivers/pscript5.dll W32X86/pscript5.dll'

Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.0.24]

Server not using user level security and no password supplied.

NT_STATUS_NETWORK_ACCESS_DENIED making remote directory \W32X86

NT_STATUS_ACCESS_DENIED opening remote file \W32X86/HL-2040.ppd

NT_STATUS_ACCESS_DENIED opening remote file \W32X86/ps5ui.dll

NT_STATUS_ACCESS_DENIED opening remote file \W32X86/pscript.hlp

NT_STATUS_ACCESS_DENIED opening remote file \W32X86/pscript.ntf

NT_STATUS_ACCESS_DENIED opening remote file \W32X86/pscript5.dll

Unable to copy Windows 2000 printer driver files (1)!
```

cupsaddsmb -H localhost -U root -h localhost -v HL-2040

----------

## darkphader

Hint:

```
Server not using user level security and no password supplied. 
```

Did you you have some important reason to change the default security mode?

Really, if you want to use Samba you should RTFM! Especially before deciding to change defaults!

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

http://us1.samba.org/samba/docs/man/Samba-Guide/

----------

## MorphiusFaydal

 *darkphader wrote:*   

> Hint:
> 
> ```
> Server not using user level security and no password supplied. 
> ```
> ...

 

Because I was trying to set up a general-access fileshare.  I do on occasion have people over to my apartment with their computers, and rather than have to train them in the use of usernames and passwords and set up usernames for everyone, I just set the security to share.  Which I was under the impression that that was an acceptable method of setting up a share. Or else why would it be in SAMBA?

Also; the lack of of a big "ERROR" or similar next to the "Server not using user level security and no password supplied." meant to *me* that it was a warning or status message of some kind, that wasn't relevant to the operation at hand.  Especially since it asks me for the password to the root samba user every time I run the command.

----------

## darkphader

 *MorphiusFaydal wrote:*   

> I just set the security to share.  Which I was under the impression that that was an acceptable method of setting up a share. Or else why would it be in SAMBA?

 

If you read the docs you will find the answer to that question. Basically you can't do domain PDC stuff with share level security - you're acting like an old Win95 box (don't expect auto-driver download, etc.). It's easy enough to set up guest shares without resorting to "security = share" which is generally frowned upon (a reading of 'man smb.conf' should convince you of this).

The main problem with Samba is not 'with Samba', it's that many users don't understand Windows networking which Samba emulates. The reality is, that a working knowledge of Windows networking is very useful to implenting Samba without a lot of new study. If you don't have that background, read the docs and start with the defaults.

----------

## boogles

 *Quote:*   

> 
> 
> Paperone samba # cupsaddsmb -U root -v PSC-1215
> 
> Password for root required to access /var/run/cups/cups.sock via SAMBA: 
> ...

 

I had this problem too.  After some experimentation I discovered that is because the files that cupsaddsmb is looking for are case sensitive.

This is a really old thread, but it is what came up in Google when I searched for help.

-b

----------

## stephelton

Just thought I'd post the problem I ran in to and my solution.

I had set up the printers, got it shared with a windows machine, and had tried printing many jobs. All would fail and I would find this in my cups log:

```
PID 16862 (/usr/libexec/cups/filter/pstoraster) crashed on signal 11!
```

A long story short, I finally tried messing with the printer options under the windows machine I was trying to print from. It was trying to print at 5760x1440 dpi! Now I knew that this crappy printer wouldn't handle that, so I changed it to something more reasonable -- 720 dpi. Worked like a charm.

To access the printer options, browse to the printer, view its properties, select the General tab, click "Printing Preferences...", Select the "Paper/Quality" tab, click "Advanced..." and you'll find what appear to be the same options found under the cups web interface.

Hope that helps some people!

----------

