LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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-20-2014, 08:23 AM   #1
jokar.mohsen
Member
 
Registered: Jul 2008
Location: Tehran
Posts: 441

Rep: Reputation: 22
Post Running a Print server for Windows clients.


Hello all.
How are you?
I want to use CentOS 6 x64 as a Print server for provide print service to Windows clients. I want to know is CUPS the best way? Any idea?

Cheers.
 
Old 12-20-2014, 08:40 AM   #2
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,340

Rep: Reputation: Disabled
CUPS is pretty much the standard print system for Linux these days. Windows clients can send print jobs to CUPS using the LPD, IPP, or AppSocket/JetDirect protocols. For this to work, a "port" must be defined on each Windows client, pointing to the IP address or hostname of the CentOS server. The "Add printer" wizard in Windows will do this automatically.

If you want to "share" a printer using the SMB/CIFS network protocol, you can use Samba. Samba doesn't replace CUPS in that scenario, but rather augments it by providing native Windows file and print sharing services.

A major advantage with Samba is that you can make the required printer drivers directly available to Windows clients. You can also restrict access to selected users or groups. If you join the Windows clients to a Samba-hosted Windows "domain", you can even push the printer to selected PCs or users automatically.

Last edited by Ser Olmy; 12-20-2014 at 08:42 AM.
 
Old 12-21-2014, 02:12 PM   #3
jokar.mohsen
Member
 
Registered: Jul 2008
Location: Tehran
Posts: 441

Original Poster
Rep: Reputation: 22
Quote:
Originally Posted by Ser Olmy View Post
CUPS is pretty much the standard print system for Linux these days. Windows clients can send print jobs to CUPS using the LPD, IPP, or AppSocket/JetDirect protocols. For this to work, a "port" must be defined on each Windows client, pointing to the IP address or hostname of the CentOS server. The "Add printer" wizard in Windows will do this automatically.

If you want to "share" a printer using the SMB/CIFS network protocol, you can use Samba. Samba doesn't replace CUPS in that scenario, but rather augments it by providing native Windows file and print sharing services.

A major advantage with Samba is that you can make the required printer drivers directly available to Windows clients. You can also restrict access to selected users or groups. If you join the Windows clients to a Samba-hosted Windows "domain", you can even push the printer to selected PCs or users automatically.

Thank you so much. Thus The CUPS is a best option for doing it. Do you know any manual that can help me in this way?
 
Old 12-21-2014, 02:21 PM   #4
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,340

Rep: Reputation: Disabled
CUPS has a web interface on port 631. Make sure it's enabled in /etc/cups/cupsd.conf and that cupsd is running, then open either http://localhost:631 or https://localhost:631, log in as root and take it from there.

There's plenty of documentation at the CUPS web site.
 
Old 12-22-2014, 03:02 AM   #5
jokar.mohsen
Member
 
Registered: Jul 2008
Location: Tehran
Posts: 441

Original Poster
Rep: Reputation: 22
Thank you so much.
My "cupsd.conf" is :

cat /etc/cups/cupsd.conf

MaxLogSize 0
LogLevel warn
SystemGroup sys root
# Allow remote access
Port 631
Listen /var/run/cups/cups.sock
# Show shared printers on the local network.
Browsing On
BrowseOrder allow,deny
BrowseAllow all
BrowseRemoteProtocols CUPS
BrowseLocalProtocols
DefaultAuthType Basic
<Location />
# Allow remote administration...
Order allow,deny
Allow @LOCAL
#Listen 172.30.10.58:631
</Location>
<Location /admin>
# Allow remote administration...
Order allow,deny
Allow @LOCAL
</Location>
<Location /admin/conf>
AuthType Default
Require user @SYSTEM
# Allow remote access to the configuration files...
Order allow,deny
Allow @LOCAL
</Location>
<Policy default>
<Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job CUPS-Move-Job CUPS-Get-Document>
Require user @OWNER @SYSTEM
Order deny,allow
</Limit>
<Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default CUPS-Get-Devices>
AuthType Default
Require user @SYSTEM
Order deny,allow
</Limit>
<Limit Pause-Printer Resume-Printer Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After CUPS-Accept-Jobs CUPS-Reject-Jobs>
#AuthType Default
AuthType Basic
AuthClass System
Require user @SYSTEM
Order deny,allow
</Limit>
<Limit Cancel-Job CUPS-Authenticate-Job>
Require user @OWNER @SYSTEM
Order deny,allow
</Limit>
<Limit All>
Order deny,allow
</Limit>
</Policy>
<Policy authenticated>
<Limit Create-Job Print-Job Print-URI>
AuthType Default
Order deny,allow
</Limit>
<Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job CUPS-Move-Job CUPS-Get-Document>
AuthType Default
Require user @OWNER @SYSTEM
Order deny,allow
</Limit>
<Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default>
AuthType Default
Require user @SYSTEM
Order deny,allow
</Limit>
<Limit Pause-Printer Resume-Printer Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After CUPS-Accept-Jobs CUPS-Reject-Jobs>
AuthType Default
Require user @SYSTEM
Order deny,allow
</Limit>
<Limit Cancel-Job CUPS-Authenticate-Job>
AuthType Default
Require user @OWNER @SYSTEM
Order deny,allow
</Limit>
<Limit All>
Order deny,allow
</Limit>
</Policy>


and my "smb.conf" about share is :

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

[homes]
comment = Home Directories
browseable = yes
writable = no
; valid users = %S
; valid users = MYDOMAIN\%S
valid users = jokar\%S
[printers]
comment = All Printers
path = /var/spool/samba
browseable = yes
guest ok = yes
writable = no
printable = yes


# Un-comment the following and create the netlogon directory for Domain Logons
; [netlogon]
; comment = Network Logon Service
; path = /var/lib/samba/netlogon
; guest ok = yes
; writable = no
; share modes = no


# Un-comment the following to provide a specific roving profile share
# the default is to use the user's home directory
; [Profiles]
; path = /var/lib/samba/profiles
; browseable = no
; guest ok = yes


# A publicly accessible directory, but read only, except for people in
# the "staff" group
; [public]
; comment = Public Stuff
; path = /home/samba
; public = yes
; writable = yes
; printable = no
; write list = +staff


but my problem is that I can't install printer via "http" in windows clients. I must tell that my CentOS is not part of my Windows domain. How can I solve it?
 
Old 12-22-2014, 05:47 AM   #6
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,340

Rep: Reputation: Disabled
Quote:
Originally Posted by jokar.mohsen View Post
but my problem is that I can't install printer via "http" in windows clients. I must tell that my CentOS is not part of my Windows domain. How can I solve it?
Sorry, I don't really understand what you're asking here.

If you're not familiar with how this works, you should try setting it up one step at a time:
  1. Make sure CUPS is installed and running on your CentOS server (cupsd should be visible in the process list)
  2. Make sure you can access the web interface from the CentOS server (may require modifications to /etc/cupsd.conf)
  3. Install the printer using the web interface, and verify that it's working by printing a test page (again, from the CentOS server)
  4. Try sharing the printer in Samba, or alternatively try connecting directly to the printer from a Windows workstation by installing is as a TCP/IP printer using either an LPR or IPP port
Give it a shot, and if you can't get it working, report back and tell us how far you got and exactly what you did.
 
1 members found this post helpful.
Old 12-24-2014, 07:32 AM   #7
jokar.mohsen
Member
 
Registered: Jul 2008
Location: Tehran
Posts: 441

Original Poster
Rep: Reputation: 22
I mean is that I can't install Printer in Windows via HTTP protocol. Please see the attachment.
Attached Thumbnails
Click image for larger version

Name:	cups-1.jpg
Views:	145
Size:	31.8 KB
ID:	17199  
 
Old 12-24-2014, 10:37 AM   #8
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,340

Rep: Reputation: Disabled
That's probably because the printer doesn't exist at that URL.

How far did you get down the list in my previous post? Does the printer work on the CentOS server?
 
Old 12-24-2014, 12:52 PM   #9
jokar.mohsen
Member
 
Registered: Jul 2008
Location: Tehran
Posts: 441

Original Poster
Rep: Reputation: 22
Of course. I can connect to it via CentOS server. For example, "http://192.169.1.2:631/printers/XXXX". In windows I can't install it via HTTP and I must use other option "Connect to this printer". I guess that I can't connect to the Printer via HTTP because of permission. Can you tell me how can I give Permission to Specific users in "cups.conf" ?
 
Old 12-26-2014, 08:47 PM   #10
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,340

Rep: Reputation: Disabled
Saying "of course" isn't particularly helpful here, since we can't possibly know what you've tried unless you explicitly tell us. The users in this forum are not mind-readers.

What do you mean you can "connect to it via the CentOS server"? That you can access that URL in a web browser? Or that you can actually send print jobs to the printer?

Did you successfully complete steps 1-3 in the list I posted earlier.

Do you get an error message when you try adding the printer from the Windows system?

Can you access the URL from the Windows system using a browser? Have you tried connecting to the TCP port (631) with Telnet or another suitable tool, just to verify connectivity?

Have you tried using LPR/LPD instead of IPP?
 
Old 12-27-2014, 08:29 AM   #11
jokar.mohsen
Member
 
Registered: Jul 2008
Location: Tehran
Posts: 441

Original Poster
Rep: Reputation: 22
Quote:
Originally Posted by Ser Olmy View Post
Saying "of course" isn't particularly helpful here, since we can't possibly know what you've tried unless you explicitly tell us. The users in this forum are not mind-readers.

What do you mean you can "connect to it via the CentOS server"? That you can access that URL in a web browser? Or that you can actually send print jobs to the printer?

Did you successfully complete steps 1-3 in the list I posted earlier.

Do you get an error message when you try adding the printer from the Windows system?

Can you access the URL from the Windows system using a browser? Have you tried connecting to the TCP port (631) with Telnet or another suitable tool, just to verify connectivity?

Have you tried using LPR/LPD instead of IPP?
I mean is that I can connect to printer via URL in web browser and can send print via CentOS too. I complete there steps that you said and problem not Solved.
I said that I can browse cups via Windows system but as you see my "cups" config, The admin just have permission to manage printers.
The connection is true and I can add printer via another option that I said in previous post.
 
  


Reply



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
Linux Print Server with Windows Clients Echo Kilo Linux - Networking 3 02-01-2007 09:45 AM
What's the best distro for a home file/print server w/ windows clients rcarroll215 Linux - Distributions 2 01-24-2007 11:12 AM
Linux Print Server for Windows Clients ericpolanco Linux - Wireless Networking 2 02-24-2005 11:57 AM
Linux Print Server for Windows Clients ericpolanco Linux - Networking 1 02-23-2005 05:43 PM
Running Mandrake 9.1 Linux Clients on Windows 2000 Domain Server marc213 Linux - Networking 0 10-30-2003 03:20 AM

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

All times are GMT -5. The time now is 09:35 AM.

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