Previous |
Home | Next |
Version: | - cups 1.2.1 |
[bash]# cp
/etc/cups/cupsd.conf /etc/cups/cupsd.conf.original [bash]# vi /etc/cups/cupsd.conf |
ServerName
galaxy.example.com ServerAdmin [email protected] AccessLog /var/log/cups/access_log DataDir /usr/share/cups DefaultCharset utf-8 DefaultLanguage en ErrorLog /var/log/cups/error_log MaxLogSize 10485760 LogLevel info Printcap /etc/printcap RequestRoot /var/spool/cups ServerBin /usr/lib/cups ServerRoot /etc/cups User lp Group sys Listen 127.0.0.1:631 Listen 192.168.1.1:631 |
<Location
/> Require valid-user Order Deny,Allow Deny From All Allow From 127.0.0.1 Allow From 192.168.1.0/24 </Location> <Location /admin> Require group printer-admins Order Deny,Allow Deny From All Allow From 127.0.0.1 Allow From 192.168.1.0/24 </Location> |
Browsing Off BrowseProtocols cups BrowseOrder Deny,Allow BrowseAllow from @LOCAL BrowseAllow from @IF(eth1) |
[bash]# chkconfig
--level 2345 cups on [bash]# chkconfig --list cups |
[bash]# /etc/init.d/cups
restart [bash]# tail /var/log/cups/error_log |
[bash]# groupadd printer-admins [bash]# usermod -G printer-admins miles |
Printers and their
drivers need to be configured before any
printing is possible, see below for details. |
[bash]# cp
/etc/cups/printers.conf
/etc/cups/printers.conf.original [bash]# vi /etc/cups/printers.conf |
<DefaultPrinter
laser> AllowUser miles @laser_printer_group Info Laser Printer - Brother HL-1430 DeviceURI parallel:/dev/lp0 Location Main Conference Room Shared Yes State Idle Accepting Yes </Printer> <Printer bubblejet> AllowUser miles DenyUser @no_print_group Info Bubblejet - HP PhotoSmart-7260 DeviceURI usb:/dev/usb/lp0 Location Administration Office Shared Yes State Idle Accepting Yes </Printer> |
Example
DeviceURI Types |
#DeviceURI
parallel:/dev/plp #DeviceURI serial:/dev/ttyd1?baud=38400+size=8+parity=none+flow=soft #DeviceURI scsi:/dev/scsi/sc1d6l0 #DeviceURI socket://hostname:port #DeviceURI tftp://hostname/path #DeviceURI ftp://hostname/path #DeviceURI http://hostname[:port]/path #DeviceURI ipp://hostname/path #DeviceURI smb://hostname/printer |
[bash]# vi /etc/cups/cupsd.conf |
<Location
/printers/laser> Order Deny,Allow Deny From All Allow From 127.0.0.1 Allow From 192.168.1.0/24 </Location> <Location /printers/bubblejet> Order Deny,Allow Deny From All Allow From 127.0.0.1 Allow From 192.168.1.0/24 </Location> |
[bash]# /etc/init.d/cups
restart [bash]# tail /var/log/cups/error_log |
<DefaultPrinter laser> | /etc/cups/ppd/laser.ppd |
<Printer bubblejet> | /etc/cups/ppd/bubblejet.ppd |
[bash]# /etc/init.d/cups
restart |
[bash]# wget -O /tmp/foomatic-filters-ppds-current.tar.gz \ http://www.linuxprinting.org/download/foomatic/foomatic-filters-ppds-current.tar.gz -U "" [bash]# tar -xzvf /tmp/foomatic-filters-ppds*.tar.gz -C /tmp [bash]# cd /tmp/foomatic-filters-ppds* [bash]# ./install --gzip |
[bash]# /etc/init.d/cups
restart [bash]# tail /var/log/cups/error_log |
[bash]# cd / [bash]# rm -Rf /tmp/foomatic-filters-ppds* |
Previous |
Home | Next |