Corn is a CentOS 6 virtual machine running on Gourd. It provides a Cups/Samba printing service to share the NPG laser printer called Wigner. Corn was designed to replace the Cups print server previously hosted on jalapeno.
- Memory: 512 MB
- Hard Disk: 10 GB
- Network 1 (eth0): Farm-Bridge
- Network 2 (eth1): UNH-Bridge
- SCSI Controller: LSI Logic
- Farm IP Address (eth0): 10.0.0.244
- UNH IP Address (eth1): 184.108.40.206
Software and Services
Corn uses the standard iptables firewall. It only allows access to ssh and Samba.
A standard cups configuration provides the printing services backend for Corn. Samba is used as a sharing and authentication layer which passes print jobs on to the cups printer spool. Wigner is currently the only printer accessible via this print server.
The CUPS interface is not publicly accessible, and in order access it by forwarding port 631 over SSH. This is restricted for security and access control reasons, limiting all access to the printer to the Samba share, which requires authentication.
A Samba share for provides sharing and user access control for the NPG printer. Samba manages accounts and passwords separately from the rest of the system, and therefore requires users configure a password for Samba in order to access the printer. User initialization requires an administrator to add a username to the Samba user database and set a password for that user account. Samba usernames should be the same as the user's NPG account username (though the password doesn't have to be). This can be done (as root) with the following command:
smbpasswd -a <username>
Subsequent password changes can be performed by the user by logging into corn and running smbpasswd (without the -a option).
printtracker.py is a simple python script which sends monthly reports of print usage gathered from the cups page log. It records the number of pages printed by each user on the system.
The script can run in two different modes. The weekly mode is configured in crontab to run before the normal cron.weekly tasks. This is necessary because it needs to read the logs before they're emptied by logrotate, which happens when the normal cron.weekly jobs run. The monthly routine that e-mails the final monthly report is run by a script in cron.monthly.