Archive for March, 2014

CUPS notes

OS: Ubuntu 12.04 LTS

I decided it was about time to solve a couple issues that seem to constantly come up for me when it comes to using CUPS in linux for printing.

The first was getting access to the configuration page from a machine other than the console. To do this you have to modify the /etc/cups/cupsd.conf file.

# JGZ – 3/26/2014 – To listen on the eth0 interface

# Restrict access to the server

Order allow,deny
# JGZ – 3/26/2014 – To allow access to /
Allow all

# Restrict access to the admin pages

Order allow,deny
# JGZ – 3/26/2014 – To allow access to /admin
Allow all

# Restrict access to configuration files

AuthType Default
Require user @SYSTEM
Order allow,deny
# JGZ – 3/26/2014 – To allow access to /admin/conf
Allow all

After the changes are made to the /etc/cups/cupsd.conf file, you need to restart cups:

# service cups restart

The next issue I had is the default size of the font. I frequently print files I create in vi or configuration files or scripts, and the font is too big by default to make the document readable. For this, I added the following to the printers.conf file in /etc/cups.

# JGZ – 3/26/2014 – decrease default font size
Option cpi 15.000000
Option lpi 9.000000

I put this un the ErrorPolicy line in between the and directives. If you have multiple printers, make sure that myprinter is the printer that you want to modify. Obviously, when you look at the printers.conf file, you will find many other options you can modify. In my case, I had to add the missing entries (see man printers.conf). For this change, you do not need to restart cups.

Note: To set the margins while printing a text file, you specify the options in the lp command line:

lp -d myprinter -o page-top=18 -o page-bottom=18 -o page-left=18 -o page-right=18 mytextfile

The options are in points (72 points are in an inch). Eighteen points would be a quarter of inch margin.

Windows Group Policy Results

The following tools can be used to review group policies.

Since Windows Vista SP1:

To view the policies applied to the computer you are logged into:

To force a policy update:
gpupdate /force

Used in concert with rsop:

Add DNS search suffix in Ubuntu

Sometimes I hate change, and this is one. I just want to edit the /etc/resolv.conf. The search suffix in Ubuntu can be added by adding the following to the /etc/network/interfaces file:

dns-search domaintosearch

For example, on my Ubuntu client:

# cat /etc/network/interfaces
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet dhcp

I am not sure if the network needs to be restarted. I did restart it by:

# service networking restart

Return top