-
Notifications
You must be signed in to change notification settings - Fork 3
Print server
Art edited this page Mar 6, 2016
·
2 revisions
Having to go to the printer and manually connect it in to their computer, especially from laptop
- Connect via network X
- Connect from laptop and desktop running windows 10 and 7
- 4 printers via USB X
- Printer: HP and Dell
- View ink levels and print jobs and queue from computers
- No need to manually operate
- No screen or keyboard X
- Automatic updates and reboot at night time
- Automatic IP address X
- Automatic discovery – others computers can easily find the print server on the network
- Always turned on
- Raspberry Pi
- 4 USB ports
- Ethernet network port
- HDMI and audio not needed
- Micro USB power socket
- Ethernet cable
- Micro USB Power Adaptor (1 Amp) Printers already have USB cables and power, and a spare ethernet port is available
- minibian
- features
- Light-weight Operating System but with full range of Raspbian packages available
- DHCP for automatic IP address
- settings
- use default root user (see Improvements below)
- features
- Samba
- share Printers (and Printer Drivers) with Windows users
- CUPS
- features
- Linux printing system
- makes drivers available to clients
- browser-based administrative control and operator panel
- settings
- no authentication (allow connected users to perform ANY action)
- features
- avahi-discover
- allows people with devices on to automatically discover printers on this print server
- download minibian image from http://sourceforge.net/projects/minibian/files/latest/download?source=files
- copied onto sd card - see instructions
- edited /etc/hostname (see here) to print-server
- manually expand partition
- inserted SD Card into Pi, connected to ethernet, powered on
# connect to pi console
# default password is raspberry
ssh root@print-server
# as root on minibian no need for sudo
apt-get update
apt-get install -y samba cups avahi-discover
# Add current user to printer admins group
usermod -a -G lpadmin $USER
vi /etc/cups/cupsd.conf
and change the sections as follows
## Only listen for connections from the local machine.
#Listen localhost:631
#Listen /var/run/cups/cups.sock
# Listen on any interface to port 631
Port 631
# credit - https://help.ubuntu.com/lts/serverguide/cups.html
# Default authentication type, when authentication is required...
# DefaultAuthType Basic
DefaultAuthType None
# Restrict access to the server...
<Location />
Order allow,deny
Allow all #### Anyone can access
</Location>
# Restrict access to the admin pages...
<Location /admin>
Order allow,deny
Allow all #### Anyone can administer
</Location>
# Restrict access to configuration files...
<Location /admin/conf>
# AuthType Default
# Require user @SYSTEM
Order allow,deny
Allow all #### Anyone can change config
</Location>
then
vi /etc/samba/smb.conf
and change the sections as follows
[global]
## Browsing/Identification ###
workgroup = WORKGROUP
wins support = yes
### Printer Services - using CUPS (NEW sub-section towards end of [global] )
load printers = yes
printing = cups
printcap name = cups
[printers]
comment = All Printers
browseable = yes
printable = yes
guest ok = yes
path = /var/lib/samba/printers
# path = /var/spool/samba/
# ? use client driver = yes
# Windows clients look for this share name as a source of downloadable
# printer drivers
[print$]
comment = Printer Drivers
path = /usr/share/cups/drivers
browseable = yes
read only = yes
guest ok = yes
write list = root, @lpadmin
- credit
- [http://www.linuxuser.co.uk/tutorials/wireless-raspberry-pi-print-server]
- [http://oliverbusse.notesx.net/Privat/raspberry.nsf/id/JUND-95VRCY]
- help
- [https://www.raspberrypi.org/forums/viewtopic.php?f=36&t=17662]
- [https://wiki.samba.org/index.php/Setup_a_Samba_print_server]
- Samba manual - Chapter 22. CUPS Printing Support - Part III. Advanced Configuration
For more information on using Samba, please see [https://github.com/artmg/lubuild/blob/master/help/configure/network-shares-with-Samba.md]
- run the services as a user which is NOT root
- best-practice security recommends only grant least privilege required