LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-03-2017, 02:08 PM   #1
jester805
LQ Newbie
 
Registered: Jun 2009
Posts: 5

Rep: Reputation: 0
Linux Print Server


I am trying to setup an Ubuntu box to be a DHCP server and Print server for a remote office. The DHCP is working fine, but it is the printing I can't get figured out.

I am running Ubuntu 16. I have Samba, CUPS, & apache2 all installed and configured.

I followed this guide:
http://www.geekyprojects.com/ubuntu/...ers-from-cups/

I have added these parts to my smb.conf file:

Quote:
[global]

hosts allow = all
security = user
load printers = yes
printing = cups
printcap name = cups
spoolss: architecture = Windows x64

[printers]
comment = All Printers
browseable = yes
path = /var/spool/samba
printable = yes
guest ok = yes
public = yes
writable = no
read only = yes
create mask = 0700

[print$]
comment = Printer Drivers
path = /usr/share/cups/drivers
browseable = yes
read only = yes
guest ok = yes
write list = root

What I am wanting is to have my users browse to the UNC path of the server and double-click on the shared printer to install the drivers down automatically.

My specific problem is that I cannot get this procedure to work with 64 bit Windows clients. It does work on 32 bit Windows clients.

From a 64 bit Windows 10 machine, I click the Start button and type: \\server and the window pops up with the shared printer. I double click on the shared printer and I get the message box about "Do you trust this printer?" I click Install driver and then the next message box comes up with the "Windows cannot connect to the printer" error 0x000000d8.

I have the 32 bit drivers here:
/usr/share/cups/drivers

The 64 bit drivers are here:
/usr/share/cups/drivers/x64

I'm not sure what I'm missing. Does anyone have any insight that might help me out?
Attached Thumbnails
Click image for larger version

Name:	0x000000d8.png
Views:	32
Size:	7.4 KB
ID:	26024  

Last edited by jester805; 10-03-2017 at 02:13 PM.
 
Old 10-03-2017, 02:54 PM   #2
mralk3
Slackware Contributor
 
Registered: May 2015
Distribution: Slackware
Posts: 1,850

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
What do the log files say on the Ubuntu server? Always check the logs if something isn't working. 9/10 times this will give you an idea about what is broken. I have a similar set up on my home LAN using Raspbian on a Rapsberry Pi 1 B+. The target machines are Windows 7 and Windows 8.1. Here is my smb.conf:

Code:
#======================= Global Settings =======================

[global]
   workgroup = WORKGROUP
   dns proxy = no
   log file = /var/log/samba/log.%m
   max log size = 1000
   syslog = 0
   panic action = /usr/share/samba/panic-action %d
   server role = standalone server
   passdb backend = tdbsam
   obey pam restrictions = yes
   unix password sync = yes
   passwd program = /usr/bin/passwd %u
   passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
   pam password change = yes
   map to guest = bad user

#======================= Share Definitions =======================

[printers]
   comment = All Printers
   browseable = no
   path = /var/spool/samba
   printable = yes
   guest ok = yes 
   read only = yes
   create mask = 0700

[print$]
   comment = Printer Drivers
   path = /var/lib/samba/printers
   browseable = yes
   read only = no 
   guest ok = no
For the most part everything is default, I basically just commented out the [Homes] share and uncommented the [printers] and [print$] sections. The one difference I noticed right away was that your print$ share is pointing to a different location than mine points to: /var/lib/samba/printers
 
Old 10-03-2017, 03:34 PM   #3
jester805
LQ Newbie
 
Registered: Jun 2009
Posts: 5

Original Poster
Rep: Reputation: 0
Thank you for replying. I renamed my smb.conf file and copy/pasted your smb.conf file. I copied the drivers to the new/original location (/var/lib/samba/printers), re-ran the cupsaddsmb command and restarted Samba. When I look at /var/log/samba/log.smbd I see these messages repeating:

Quote:
[2017/10/03 15:26:46, 0] smbd/server.c:1072(main)
smbd version 3.6.25 started.
Copyright Andrew Tridgell and the Samba Team 1992-2011
[2017/10/03 15:26:46, 0] param/loadparm.c:8021(lp_do_parameter)
Ignoring unknown parameter "server role"
[2017/10/03 15:26:46.170976, 0] param/loadparm.c:8021(lp_do_parameter)
Ignoring unknown parameter "server role"
[2017/10/03 15:26:46.171496, 0] smbd/server.c:1128(main)
standard input is not a socket, assuming -D option

I'm still getting the same error when I double-click the printer to add it to my PC.
 
Old 10-03-2017, 06:25 PM   #4
mralk3
Slackware Contributor
 
Registered: May 2015
Distribution: Slackware
Posts: 1,850

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
If I had known you planned on a copy and paste of my configuration I wouldn't have bothered to post at all.

You need to look at the logs using your configuration and then post back here with the log output. You will have to read the man pages and modify your configuration to fit your needs. The idea is you use your brain instead of copy and paste system administration. This is a very bad practice.

My samba configuration is very relaxed on security because it runs on my home local area network. My configuration is also dependant on my iptables rules to block unauthorized access to my print and scan services.

I highly suggest you read the Ubuntu 16.04 official documentation discussing how to set up a print server and how to secure a file and print server.

https://help.ubuntu.com/lts/servergu...intserver.html
https://help.ubuntu.com/lts/servergu...-security.html

These pages are a good starting point. They are by no means complete, and likely will require you to add to or subtract from your configuration to provide an accurate and secure print server. It's not hard to set up. You will have to read though. I suggest you also take a look at the man pages:

Code:
man samba
man smb.conf
I suggest you first get a least complicated configuration working and then build on it with authentication and proper permissions.
 
Old 10-03-2017, 07:39 PM   #5
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874
For linux to linux cups uses email (exim4 on debian) to do job management. About the only thing that I need to do on the client machines (in linux) is put the IP of the print server in /etc/hosts (but I use static IPs without DHCP). I don't have to have the print driver for the specific printer on the client machine (in fact I can't since pnm2ppa is a bit broke in arch atm). I do have to have cups-browsed and exim4 running though. I don't know if that has any bearing on windows. But it works for me as the print server I had setup isn't powerful enough to open the PDFs to print them these days. Plus always 1G+ behind in updates since I only boot it to print. Soon to be an RPi model B since I recently got a usb to parallel port adapter, plus verified that it works on a more powerful debian machine.
 
Old 10-04-2017, 07:57 AM   #6
jester805
LQ Newbie
 
Registered: Jun 2009
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by mralk3 View Post
If I had known you planned on a copy and paste of my configuration I wouldn't have bothered to post at all.

You need to look at the logs using your configuration and then post back here with the log output. You will have to read the man pages and modify your configuration to fit your needs. The idea is you use your brain instead of copy and paste system administration. This is a very bad practice.


I suggest you first get a least complicated configuration working and then build on it with authentication and proper permissions.


Wow, thanks for slamming me on a support forum. I only copy pasted your config as a "test" or "alternate starting point" to get the least complicated setup working (as you so kindly suggested). There were a few options in your smb.conf file that I did change in order to match my environment. I have already looked at the logs (which I posted in my last reply), but they didn't tell me much.

I did read the man pages and searched Google for the specific error I am getting. After several attempts at trial & error, I reluctantly posted here looking for help.
 
Old 10-04-2017, 10:49 AM   #7
michaelk
Moderator
 
Registered: Aug 2002
Posts: 24,745

Rep: Reputation: 5599Reputation: 5599Reputation: 5599Reputation: 5599Reputation: 5599Reputation: 5599Reputation: 5599Reputation: 5599Reputation: 5599Reputation: 5599Reputation: 5599
I maybe able to explain why it isn't working but not how to fix the problem. The link you posted does not include any information about 64 bit clients which need the 64 bit cups drivers. When Apple bought cups they appear to have fallen into the abyss.

I found a link but the source is unknown. Use at your own risk.
https://bitbucket.org/oherrala/puppe...s/drivers/x64/

About the only other method I found for automatic driver is here:
https://wiki.samba.org/index.php/Set...indows_Clients

It looks like mralk3 is running samba 4.0x and your running version 3.x which is why the server role directive is an unknown parameter.
 
Old 10-04-2017, 01:33 PM   #8
jester805
LQ Newbie
 
Registered: Jun 2009
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by michaelk View Post
I maybe able to explain why it isn't working but not how to fix the problem. The link you posted does not include any information about 64 bit clients which need the 64 bit cups drivers. When Apple bought cups they appear to have fallen into the abyss.

I found a link but the source is unknown. Use at your own risk.
https://bitbucket.org/oherrala/puppe...s/drivers/x64/

About the only other method I found for automatic driver is here:
https://wiki.samba.org/index.php/Set...indows_Clients

It looks like mralk3 is running samba 4.0x and your running version 3.x which is why the server role directive is an unknown parameter.


Thank you for your help. I actually already found the second link you posted (about 64 bit drivers). I added this line to my original smb.conf file:
Quote:
spoolss: architecture = Windows x64
.

I will check out the drivers in your first link to see if that helps.

Thanks again
 
Old 10-04-2017, 03:23 PM   #9
mralk3
Slackware Contributor
 
Registered: May 2015
Distribution: Slackware
Posts: 1,850

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
A search on Google of "operation failed 0x000000d8" found in the first few results:

https://www.linuxquestions.org/quest...on-4175522852/

That guy reports the same error. Usually its helpful to look at the Windows logs to identify issues too. This page:

https://msdn.microsoft.com/en-us/library/cc231199.aspx

Suggests the following about the error code:
Quote:
0x000000D8

ERROR_EXE_MACHINE_TYPE_MISMATCH


This version of %1 is not compatible with the version of Windows you're running. Check your computer's system information to see whether you need an x86 (32-bit) or x64 (64-bit) version of the program, and then contact the software publisher.
So to me at least, the issue appears to be that samba is serving the wrong drivers based on the architecture of your windows machines. Are you sure you have the right driver software copied over?
 
  


Reply

Tags
sambacups


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
[SOLVED] Printing from Linux Desktop/Server to Windows Print Server without Authentication? wveagle81 Linux - General 3 08-27-2013 10:59 AM
cups/samba print server & manufacturers print drivers bourne Linux - Server 0 03-15-2011 04:44 PM
instant print from pop3 mail server ie emulate ipad print to hp printers PDock Linux - Software 2 12-08-2010 03:45 PM
Print jobs repeat infinetly on lpd printer attached to axis print server linux-who? Linux - Hardware 0 03-28-2006 11:24 AM
Can a Linux print server be set up on a Microsoft server network? crenshawmarc Mandriva 3 09-29-2003 07:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:35 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
Open Source Consulting | Domain Registration