Ubuntu - Sharing a Printer with Windows
It is usually best to use a native printing protocol. For Ubuntu, LPD and CUPS are native. Most versions of Windows support network printing to LPD servers, so sharing with LPD should be enough, but it requires users to configure their printers.
Native Windows environments can share printers using the Server Message Block (SMB) protocol. This allows Windows users to browse the Network Neighborhood and add any shared printers-very littlemanual configuration is required. For Ubuntu to share a printer with Windows users requires installing SAMBA, an open source SMB server.
On the print server:
1. Install SAMBA on the print server. This providesWindows SMB support:
1 sudo apt-get install samba
2. Create a directory for the print spool:
view sourceprint?
1 sudo mkdir /var/spool/samba/
3. Edit the SAMBA configuration file: /etc/samba/smb.conf.
4. Under the [global] section, change workgroup = to match yourWindows Workgroup. For example, my office workgroup is SLUGGO:
view sourceprint?
1 [global]
2 workgroup = SLUGGO
5. Under the [global] section is an area for printer configuration. Uncomment (remove the leading ;) the load printers = yes andCUPSprinting lines.
view sourceprint?
01 ########## Printing ##########
02 # If you want to automatically load your printer list rather
03 # than setting them up individually then you’ll need this
04 load printers = yes
05 # lpr(ng) printing. You may wish to override the location of the
06 # printcap file
07 ; printing = bsd
08 ; printcap name = /etc/printcap
09 # CUPS printing. See also the cupsaddsmb(8) manpage in the
10 # cupsys-client package.
11 printing = cups
12 printcap name = cups
6. Set the [printers] section to look like this:
01 [printers]
02 comment = All Printers
03 browseable = no
04 security = share
05 use client driver = yes
06 guest ok = yes
07 path = /var/spool/samba/
08 printable = yes
09 public = yes
10 writable = yes
11 create mode = 0700
This setting allows any Windows client to access the printers without a password.
7. (Optional) Under the [printers] section, set browseable = yes. This allows Windows systems to see the printers through the Network Neighborhood.
8. Restart the SAMBA server:
view sourceprint?
1 sudo /etc/init.d/samba restart
On the Windows client, you can add the printer as if it were a Windows printer. For example, if the server’s name is printer.home.com and the printer is Okidata, then the shared printer resource would be \\printer.home.com\Okidata.Windows clients will need to install their own print drivers.
It is usually best to use a native printing protocol. For Ubuntu, LPD and CUPS are native. Most versions of Windows support network printing to LPD servers, so sharing with LPD should be enough, but it requires users to configure their printers.
Native Windows environments can share printers using the Server Message Block (SMB) protocol. This allows Windows users to browse the Network Neighborhood and add any shared printers-very littlemanual configuration is required. For Ubuntu to share a printer with Windows users requires installing SAMBA, an open source SMB server.
On the print server:
1. Install SAMBA on the print server. This providesWindows SMB support:
1 sudo apt-get install samba
2. Create a directory for the print spool:
view sourceprint?
1 sudo mkdir /var/spool/samba/
3. Edit the SAMBA configuration file: /etc/samba/smb.conf.
4. Under the [global] section, change workgroup = to match yourWindows Workgroup. For example, my office workgroup is SLUGGO:
view sourceprint?
1 [global]
2 workgroup = SLUGGO
5. Under the [global] section is an area for printer configuration. Uncomment (remove the leading ;) the load printers = yes andCUPSprinting lines.
view sourceprint?
01 ########## Printing ##########
02 # If you want to automatically load your printer list rather
03 # than setting them up individually then you’ll need this
04 load printers = yes
05 # lpr(ng) printing. You may wish to override the location of the
06 # printcap file
07 ; printing = bsd
08 ; printcap name = /etc/printcap
09 # CUPS printing. See also the cupsaddsmb(8) manpage in the
10 # cupsys-client package.
11 printing = cups
12 printcap name = cups
6. Set the [printers] section to look like this:
01 [printers]
02 comment = All Printers
03 browseable = no
04 security = share
05 use client driver = yes
06 guest ok = yes
07 path = /var/spool/samba/
08 printable = yes
09 public = yes
10 writable = yes
11 create mode = 0700
This setting allows any Windows client to access the printers without a password.
7. (Optional) Under the [printers] section, set browseable = yes. This allows Windows systems to see the printers through the Network Neighborhood.
8. Restart the SAMBA server:
view sourceprint?
1 sudo /etc/init.d/samba restart
On the Windows client, you can add the printer as if it were a Windows printer. For example, if the server’s name is printer.home.com and the printer is Okidata, then the shared printer resource would be \\printer.home.com\Okidata.Windows clients will need to install their own print drivers.
No comments:
Post a Comment