Online Book Reader

Home Category

Running Linux, 5th Edition - Matthias Kalle Dalheimer [311]

By Root 1497 0
and log on using your Samba account username and password. (On Windows NT/2000/XP, you will need to add a new user account, using the Samba account's username and password.) Double-click on the Network Neighborhood or My Network Places icon on the desktop. Browse through the network to find your workgroup, and double-click on its icon. You should see an icon for your Samba server in the window that opens. By double-clicking on that icon, you will open a window that shows your home directory, printer, and officedata shares. Now you can drag and drop files to and from your home directory and data shares, and, after installing a printer driver for the shared printer, send Windows print jobs to your Linux printer!

We have only touched the surface of what Samba can do, but this should already give you an impression of why Samba—despite not being developed just for Linux—is one of the software packages that have made Linux famous.

Automatic Printer Driver Download

Windows network administrators understand the benefits of easy and reliable printer installations on Windows workstations. Consider, if you will, an example from the daily grind of network administration where printer drivers have not been uploaded to print servers. The network administrator arrives at the desk of a user who requires access to a new printer; he begins to install the printer and discovers that he left the driver disk on his desk. Now he has to walk back to his desk, and in some large businesses that can be a long walk. Alternately, he discovers that the driver does not work and a later driver release is needed. It is so much more convenient to have all printer drivers already installed on the print server!

The trouble with this is that what to some is just part of the holy grail of network administration is to others a great frustration. The following steps will relieve that pain. Follow these steps and you too can enjoy automatic printer driver installation from your print servers. Do follow along carefully, though, because one misstep can cause the process to fail.

First, update your smb.conf file as shown in Example 15-4. The changes from the previous example have been highlighted.

Example 15-4. Samba smb.conf file for an office network

# Global parameters

[global]

workgroup = TOPCAT

netbios name = LOUDBELL

passwd chat = *New*Password* %n\n *Re-enter*new*password* %n\n *Password*changed*

username map = /etc/samba/smbusers

syslog = 0

name resolve order = wins bcast hosts

printcap name = CUPS

cups options = raw

show add printer wizard = Yes

add machine script = /usr/sbin/useradd -s /bin/false -d /dev/null '%u'

logon script = scripts\logon.bat

logon path =

logon home = \\%L\%U

logon drive = H:

domain logons = Yes

printer admin = jbloggs

preferred master = Yes

wins support = Yes

[homes]

comment = Home Directories

valid users = %S

read only = No

browseable = No

[printers]

comment = SMB Print Spool

path = /var/spool/samba

guest ok = Yes

use client driver = No

printable = Yes

default devmode = Yes

browseable = No

[print$]

comment = Printer Drivers

path = /var/lib/samba/drivers

[netlogon]

comment = Network Logon Service

path = /var/lib/samba/netlogon

guest ok = Yes

[officedata]

comment = Office Files

path = /data/office

read only = No

When the smb.conf file has been edited as shown, verify that Samba is running.

In our example smb.conf file, we have specified that the Windows user jbloggs will have the rights to manage printers.

The next step is to create the /var/lib/samba/drivers directory, as well as the sub-directories beneath it. This is where the Windows printer driver files will be stored. These steps will suffice:

linux:~ # mkdir -p /var/lib/samba/drivers

linux:~ # cd /var/lib/samba

linux:~ # mkdir -p drivers/{W32ALPHA,W32MIPS,W32PPC}

linux:~ # mkdir -p drivers/{W32X86/{2,3},WIN40,COLOR,IA64,x64}

linux:~ # chown -R jbloggs:root drivers

linux:~ #chmod -R u+rwx,g+rwx,o+rx-w drivers

Install the Linux system printers that you wish to make available for use by MS Windows

Return Main Page Previous Page Next Page

®Online Book Reader