LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 12-29-2010, 09:35 AM   #1
molard
LQ Newbie
 
Registered: Dec 2010
Posts: 1

Rep: Reputation: 0
Question cupsaddsmb "Unable to copy Windows 2000 printer driver files (2)!"


Good morning,

I am in the process of integrating CUPS and Samba to allow Windows clients to automatically download print drivers from the server. I have Fedora 13 and I have updated to all of the latest packages.

CUPS is set up correctly and I have one printer installed as a test. I can print just fine and the text appears okay. I searched for the model on www.openprinting.org and found that it works perfectly, so it says. The model is a Savin CLP 240, by the way, and it supports PostScript3. I downloaded the .ppd file from the www.openprinting.org website and used it.

Samba is set up correctly and I have one share as a test. My smb.conf file has the following important information included:

[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

[print$]
comment = Printer Drivers
path = /etc/samba/drivers
browseable = yes
guest ok = no
read only = yes
write list = root

Following the man pages of cupsaddsmb, I downloaded the Windows cups drivers and extracted them to /usr/share/cups/drivers. I also copied the Microsoft PostScript drivers from an XP machine and placed them in there as well. I ensured all filenames were lowercase.

When I browse to my Samba server, I see the file shares and I see my single printer shared. When I double-click on the printer to connect, I get a message "You are about to connect to a printer on MyServer, which will automatically install a print driver on your machine..." I click Yes, and it's followed by another message "The server for the printer does not have the correct driver installed..." I click OK and I'm asked to browse for the driver.

I have browsed for the driver once before and the printer DOES work after installing it manually.

I run the cupsaddsmb command as follows:

cupsaddsmb -U printadmin%printadmin -a -h localhost -v

I receive the error:

Unable to copy Windows 2000 printer driver files (2)!
Running command: smbclient //localhost/print$ -N -A /tmp/cupsbGnRdf -c 'mkdir W32X86;put /tmp/cupsYFlOc0 W32X86/SavinCLP240.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'

And it continuously repeats

My trial and error list:

I have changed the user in "write list" in the smb.conf file from root to printadmin. Still the same error.

I changed the user in "write list" back to root and I've ran the command cupsaddsmb with the root user. Still the same.

I've su to printadmin and ran the command. Still the same.

I have checked permissions on /usr/share/cups/drivers, /etc/samba/drivers, and /etc/cups/ppd. I have run the commands chmod -R 777 and chown -R root:sharedusers on them. Sharedusers is a group that contains root and printadmin.

I've also restarted the smb and cups services after each of my tests.

This is where it get's interesting. I noticed the error is referring to my printer SavinCLP240. I removed the printer by using the lpadmin command and ran cupsaddsmb again. This time, no response is given when I press enter. No error message, no "okay", just back to the original prompt. When I add my printer again by using lpadmin, followed by the cupsaddsmb command, the error repeats again. I've even removed the Savin printer and performed the entire steps again using a Lexmark printer. Same error but with the Lexmark name in the error instead.

I've spent hours researching possible solutions and I've found many that haven't worked. There must be an easy explaination as to why I'm getting this error. Does anyone have any ideas?
 
Old 02-01-2012, 03:48 AM   #2
souchaud
LQ Newbie
 
Registered: Feb 2012
Posts: 1

Rep: Reputation: Disabled
I think in your case, the smbclient program is missing.

On debian-like, launch :
sudo aptitude install smbclient

I'm a bit late, but it can be useful to others.
bye
 
Old 05-21-2013, 03:56 PM   #3
mobjr
Member
 
Registered: Apr 2009
Location: Brazil
Distribution: Slackware
Posts: 50

Rep: Reputation: 0
Unhappy Slack14x32 cups and samba - tree connect failed: NT_STATUS_ACCESS_DENIED

Hi.

I have the same problem. I follow the man pages of cupsaddsmb too. My Print is Samsung ML-2010 with slack14x32. I cannot share my printer.

My Slack, Samba, cups works without problem, but when I try to share my Printer, i see that message:

Quote:
root@MOBJR:~# cupsaddsmb -a -v -H 192.168.0.11 -U root -h 192.168.0.11:631
Password for root required to access 192.168.0.11 via SAMBA:
Running command: smbclient //192.168.0.11/print$ -N -A /tmp/0147051a1f989 -c 'mkdir W32X86;put /tmp/0147051a2423d W32X86/SambaPDFPrinter.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=[GRPMBR] OS=[Unix] Server=[Samba 3.6.8]
tree connect failed: NT_STATUS_ACCESS_DENIED

Unable to copy Windows 2000 printer driver files (1).
Running command: smbclient //192.168.0.11/print$ -N -A /tmp/0147051a25dd7 -c 'mkdir W32X86;put /tmp/0147051a2423d W32X86/SambaPDFPrinter.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=[GRPMBR] OS=[Unix] Server=[Samba 3.6.8]
tree connect failed: NT_STATUS_ACCESS_DENIED

Unable to copy Windows 2000 printer driver files (1).
Running command: smbclient //192.168.0.11/print$ -N -A /tmp/0147051a2bf14 -c 'mkdir W32X86;put /tmp/0147051a2423d W32X86/SambaPDFPrinter.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=[GRPMBR] OS=[Unix] Server=[Samba 3.6.8]
tree connect failed: NT_STATUS_ACCESS_DENIED

Unable to copy Windows 2000 printer driver files (1).
 
Old 06-14-2013, 12:45 PM   #4
mobjr
Member
 
Registered: Apr 2009
Location: Brazil
Distribution: Slackware
Posts: 50

Rep: Reputation: 0
Thumbs up

I found my problem. I guess...

I added in "[global]", "use client driver = yes" on my "/etc/samba/smb.conf" and after I added my current user with "smbpasswd -a" and cups user(Samsung ML-2010).

I found a button called "Export Printers to Samba"
https://docs.google.com/file/d/0BxrW...it?usp=sharing
 
Old 04-06-2015, 10:56 AM   #5
frank16
LQ Newbie
 
Registered: Apr 2015
Posts: 1

Rep: Reputation: Disabled
I have been fighting this problem.

It turned out that you have to make samba users with the command:
>sudo smbpasswd -a <username>
Use the same passwd as for the linux account. I'm not sure, but there are settings in /etc/samba/smb.conf to sync the passwd.
I made both a root user and my own name, but my own name was sufficient. Root is simpler because you will not have rights issues in the printer directory, so the 'chown' and 'chmod' below is not required. I'm not so happy with the root stuff though, but I am using it on my home network behind a firewall and you can set encryption on in the smb.conf file.

Once you have done that, make sure that the directory pointed to by the [printer$] section has the proper write permissions set for this this user.
It would be something along the line of [printer$] points to /var/lib/samba/printers but I think the standard is /etc/samba/printers:
>sudo chown -R root:<username> /var/lib/samba/printers
>sudo chmod -R g+w /var/lib/samba/printers

Finally, I found this on the samba site, you're supposed to add it to the [global] section and it allows smbclient to use windows privileges.
I don't think it is required, it's is supposed to be for user directory rights under samba but I do have it in my settings:
#allow windows privilege model
enable provileges = yes

After this I could go in the cuppsadmin/administration and use the 'export Printers to Samba' button

Hope this helps someone...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy "Intel 45GM GL (Cantiga)" driver from Mandriva to Slackware Veten Linux - Hardware 6 08-09-2009 03:08 PM
"Permission denied" when trying to copy files into mounted windows with all rights twist3r Linux - Newbie 14 05-06-2008 06:30 PM
USB Printer "Unable to open device" Error nuro305 SUSE / openSUSE 3 06-05-2007 03:59 PM
winxp says "unable to connect..." to server attached printer linuxlimbo Linux - Networking 1 09-20-2006 11:39 PM
"Unable to create printer" from KDE Wizard when setting up SMB printer Happy2Bme SUSE / openSUSE 1 01-18-2005 08:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:46 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration