-
Con't from post above
Step 2: Editing cupsd.conf
WARNING: When editing conf files, always make a backup before making changes. That way, when it gets messed up, you have an easy fix! This is done very simply:
Open printer Web Interface for knoppix, use command line for slackware:
Knoppix - preferences > printer configurations > admin tab > edit config file button and copy the file and paste as below.slackware - root# cp /etc/cups/cupsd.conf /etc/cups/cupsd.conf.backup
My config backup
#
# "$Id: cupsd.conf.in 8805 2009-08-31 16:34:06Z mike $"
#
# Sample configuration file for the CUPS scheduler. See "man cupsd.conf" for a
# complete description of this file.
#
# Log general information in error_log - change "warn" to "debug"
# for troubleshooting...
LogLevel warn
# Deactivate CUPS' internal logrotating, as we provide a better one, especially
# LogLevel debug2 gets usable now
MaxLogSize 0
# Administrator user group...
SystemGroup lpadmin
# Only listen for connections from the local machine.
Listen localhost:631
Listen /var/run/cups/cups.sock
# Show shared printers on the local network.
Browsing On
BrowseOrder allow,deny
BrowseAllow all
BrowseLocalProtocols CUPS dnssd
# Default authentication type, when authentication is required...
DefaultAuthType Basic
# Restrict access to the server...
<Location />
Order allow,deny
</Location>
# Restrict access to the admin pages...
<Location /admin>
Order allow,deny
</Location>
# Restrict access to configuration files...
<Location /admin/conf>
Satisfy any
Allow from 127.0.0.1
AuthType Default
Require user @SYSTEM
Order allow,deny
</Location>
# Set the default printer/job policies...
<Policy default>
# Job-related operations must be done by the owner or an administrator...
<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>
Satisfy any
Allow from 127.0.0.1
Require user @OWNER @SYSTEM
Order deny,allow
</Limit>
# All administration operations require an administrator to authenticate...
<Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default CUPS-Get-Devices>
Satisfy any
Allow from 127.0.0.1
AuthType Default
Require user @SYSTEM
Order deny,allow
</Limit>
# All printer operations require a printer operator to authenticate...
<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>
Satisfy any
Allow from 127.0.0.1
AuthType Default
Require user @SYSTEM
Order deny,allow
</Limit>
# Only the owner or an administrator can cancel or authenticate a job...
<Limit Cancel-Job CUPS-Authenticate-Job>
Satisfy any
Allow from 127.0.0.1
Require user @OWNER @SYSTEM
Order deny,allow
</Limit>
<Limit All>
Order deny,allow
</Limit>
</Policy>
# Set the authenticated printer/job policies...
<Policy authenticated>
# Job-related operations must be done by the owner or an administrator...
<Limit Create-Job Print-Job Print-URI>
Satisfy any
Allow from 127.0.0.1
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>
Satisfy any
Allow from 127.0.0.1
AuthType Default
Require user @OWNER @SYSTEM
Order deny,allow
</Limit>
# All administration operations require an administrator to authenticate...
<Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default>
Satisfy any
Allow from 127.0.0.1
AuthType Default
Require user @SYSTEM
Order deny,allow
</Limit>
# All printer operations require a printer operator to authenticate...
<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>
Satisfy any
Allow from 127.0.0.1
AuthType Default
Require user @SYSTEM
Order deny,allow
</Limit>
# Only the owner or an administrator can cancel or authenticate a job...
<Limit Cancel-Job CUPS-Authenticate-Job>
Satisfy any
Allow from 127.0.0.1
AuthType Default
Require user @OWNER @SYSTEM
Order deny,allow
</Limit>
<Limit All>
Order deny,allow
</Limit>
</Policy>
#
# End of "$Id: cupsd.conf.in 8805 2009-08-31 16:34:06Z mike $".
#
Once your backup is created, open the cupsd.conf file using your favorite text editor (vi, nano, emacs, etc.):
Code:
root# nano /etc/cups/cupsd.conf
You will me making only small modifications to this file. First and foremost, look for the line that looks something like this:
Code:
#ServerName myhost.domain.com
If it isn't there, add it!
Note the #. Delete this to uncomment the line. You may either put in your hostname or the static ip address you assigned earlier or the DHCP from ifconfig.
You may place this code on its own line near the top of the file. The line should look like this:
Code:
ServerName 192.168.15.???
Note: For simplicity sake, I personally chose ip address (if you couldn't already tell!). That way if I modify my hostname or anything, the ip can stay the same.
The second adjustment you will make is to the line that looks like this under # Show shared printers on the local network. (once again if it isn't there, add it):
Code:
#BrowseAddress x.y.z.255#BrowseAddress x.y.255.255#BrowseAddress x.255.255.255#BrowseAddress 255.255.255.255#BrowseAddress @LOCAL#BrowseAddress @IF(name)
You can uncomment one of these lines or just add your own. It needs to look like this:
Code:
BrowseAddress 192.168.15.255
This should your broadcast for your entire network. Adjust the 255 to whatever your netmask is.
In Knoppix use ifconfig to acquire your broadcast address. Look for Bcast:192.168.15.255. Yours may be different.
con't on next post
-
Con't from post above
Finally look for this section of the cupsd.conf file:
Code:
<Location />Order Deny,AllowDeny From AllAllow From 127.0.0.1</Location>
Create a new line after Allow From 127.0.0.1 and add the ip addresses or ranges for your network. The <Location /> section should look like this when you are done(the new line is in red):
Code:
<Location />Order Deny,AllowDeny From AllAllow From 127.0.0.1Allow From 192.168.15.*</Location>
You should adjust this line according to your network address setup.
For example, my network has static ips so I just added the ip address for the client, or networked computer.
I used the addy of my server(network computer) instead of the client cpu.
In networks with many more clients, this is a hassle, so doing the above is more friendly. Save the file and restart the cups server.
Code:
root#/etc/rc.d/rc/cups restart
If the server restarts, you are ready to go on to Step 3. If you get an error, make sure that you typed in all of your ip addresses correctly. I ran into trouble when I updated the listen section. It only borked it up, so unless you know what you're doing, only make the changes mentioned above.
Step 3: Setting Up the Client
Your server is ready to roll, so now it's time to set up your client machine. In order for your client to communicate with the server, the client needs to be running the cups daemon. Install cups and any other driver libraries that you needed on the server. In the above example, it was cups and gimp-print. Start cups:
Code:
root#/etc/rc.d.rc.cups start
You need to have cups running to access the network printer. You don't need to do anything with the cupsd.conf though, so once the daemon is started, move on to Step 4.
Step 4 Knoppix: Introducing Your Client to Your Server
Share the Knoppix CUPS Printer
Go here: http://www.owlfish.com/thoughts/wini...003-07-20.html
One thing both of these options have in common is the requirement that the printer queues you create are shared.
In knoppix do this:
in the "Printer configuration" tool (from Preferences -> Printing)
by selecting File, followed by "Server Settings -> Sharing...". select all applicable options for your setup type.
Step 5 knoppix: Hostname lookup
Another common step is to ensure that hostname broadcast by CUPS is accessible from the Windows XP machine.
If your CUPS machine is accessible using a name rather than just an IP address then you don't need to do anything for this step. If the CUPS machine is not accessible via it's hostname then you need to set a mapping between the CUPS hostname and its IP address in the Windows hosts file.
Since my WinXp is using an IP address, mapping between the CUPS hostname and its IP address in the Windows hosts file is needed.
WindowsXP the host file is in
C:\WINDOWS\SYSTEM32\DRIVERS\ETC\HOSTS
# host entry for cups network at home
<this the knoppix lan server addy> Microknoppix
Step 6 Knoppix: Using a Printer Driver
Add a raw queue
Note:you may need to install the windoze print driver before doing the following steps.
This may require you actually connect the printer to the WinXp box.
In Windows XP use "Add Printer" to add a new network printer,
Select “network printer”
Select “next”
selecting "Connect to a printer on the Internet", and
using a URL of
http://hostname:631/printers/RawPrinterQueueName.
http://192.168.15.101:631/printers/Deskjet-D4200-series
Select the printer driver for this printer as you would for a locally connected printer.
STEP 7: print test page
Your page should print ok.
CUPS FILE AFTER THE ABOVE CHANGES
LogLevel warn
MaxLogSize 0
ServerName 192.168.15.???
SystemGroup lpadmin
# Allow remote access
Port 631
Listen /var/run/cups/cups.sock
# Enable printer sharing and shared printers.
Browsing On
BrowseOrder allow,deny
BrowseAllow all
BrowseRemoteProtocols CUPS
BrowseAddress @LOCAL
BrowseLocalProtocols CUPS dnssd
DefaultAuthType Basic
<Location />
# Allow shared printing and remote administration...
Order allow,deny
Allow all
</Location>
<Location /admin>
# Allow remote administration...
Order allow,deny
Allow all
</Location>
<Location /admin/conf>
Satisfy any
AuthType Default
Require user @SYSTEM
# Allow remote access to the configuration files...
Order allow,deny
Allow all
</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>
Satisfy any
Allow from 127.0.0.1
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>
Satisfy any
Allow from 127.0.0.1
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>
Satisfy any
Allow from 127.0.0.1
AuthType Default
Require user @SYSTEM
Order deny,allow
</Limit>
<Limit Cancel-Job CUPS-Authenticate-Job>
Satisfy any
Allow from 127.0.0.1
Require user @OWNER @SYSTEM
Order deny,allow
</Limit>
<Limit All>
Order deny,allow
</Limit>
</Policy>
<Policy authenticated>
<Limit Create-Job Print-Job Print-URI>
Satisfy any
Allow from 127.0.0.1
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>
Satisfy any
Allow from 127.0.0.1
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>
Satisfy any
Allow from 127.0.0.1
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>
Satisfy any
Allow from 127.0.0.1
AuthType Default
Require user @SYSTEM
Order deny,allow
</Limit>
<Limit Cancel-Job CUPS-Authenticate-Job>
Satisfy any
Allow from 127.0.0.1
AuthType Default
Require user @OWNER @SYSTEM
Order deny,allow
</Limit>
<Limit All>
Order deny,allow
</Limit>
</Policy>
Conclusion
This setup worked for me.
Now my next step is take the laptop server back to the orginal location across town.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Cisco ASA5506-K9 ASA 5506-X Network Security Firewall
$40.00
Fortinet Fortigate FG-61E Firewall Network Security Appliance ATP Bundle 1 years
$263.99
Fortinet FortiGate 60F | 10 Gbps Firewall Network Security EXPIRED (FG-60F)- New
$226.79
Cisco ASA 5506-X Network Security Firewall w/ AC Adapter
$39.99
Ubiquiti Networks USG Unifi Security Gateway Router/Firewall Fully functional
$40.00
Fortinet Fortigate-61e Security Firewall Appliance No AC Adapter/SSD
$44.99
Ubiquiti Networks USG Unifi Security Gateway Router/Firewall
$50.00
Cisco ASA 5525-X ASA5525 8-Port Firewall Adaptive Security Appliance
$50.00
Cisco ASA 5516-X Adaptive Security Firewall Appliance Network Device
$249.99
Palo Alto Networks PA-850 Firewall VPN Gateway w/ Rack Ears and Dual PSU
$194.99