Today I tried to configure my friend’s server to have network printer attached on it. It’s a PC server powered by OpenSUSE 10.3. The printer that must be configure as network printer is Epson Stylus Photo R230, see the photo of that :

I got some difficulties to configure Samba so that printer can be accessed by all Samba user in the network. So here is the conclusion that I’ve got after several hours tweaking OpenSUSE to provide network printer services :
- Connected the printer to the server. OpenSUSE recognized Epson Stylus Photo R230 directly as soon as I connected the USB connector to the server. I didn’t need to install or do anything….it’s just work when connected to OpenSUSE. Using
lpstat we can know all the printer connected to the operating system. To see installed printer, I use this command :
# lpstat -v
device for EPSON_Stylus_Photo_R230: usb://EPSON/Stylus%20Photo%20R230
- I must configure
/etc/samba/smb.conf. In the existing smb.conf file, I put some codes like this :
load printers = yes
printcap name = /etc/printcap
printing = cups
printcap name = cups
[printers]
path = /var/spool/samba
browseable = yes
guest ok = no
writable = yes
printable = yes
printer name = EpsonStylusR230
valid users = edi, tedy
[print$]
comment = printer driver
path = /etc/samba/drivers
browseable = yes
guest ok = yes
read only = yes
To be honest, I still don’t know what is /etc/printcap and several other lines stands for. I just know that the path of the printer will announce to all Samba user that there is a network printer which can be used.
- The other file that must be configured is
/etc/cups/cupsd.conf. This file will make server to provide network printer service to all Samba user. Network printer that use cups will used port 631 to listens printing request from all client. So I must defined that all server network interface that will used for network printer is 192.168.0.4:631 I also add some access control list using Allow From 192.168.0.* to guarantee that only client inside the network can access the printer. In the existing file, I put several lines like these :
listen 192.168.0.4:631
Browsing On
BrowseOrder Allow,Deny
BrowseAllow @LOCAL
<Location />
Order Deny,Allow
Allow From localhost
Allow From 127.0.0.2
Allow From 192.168.0.*
</Location>
- The other file must be edited is
/etc/cups/mime.convs Just add this line :
application/octet-stream application/vnd.cups-raw 0 -
- The last file must be edited is
/etc/cups/mime.types Just comment out this line :
application/octet-stream
- After edit those files, I must restart
cups and samba services using this commands :
# /etc/init.d/smb restart
# /etc/init.d/cupsd restart