Sharing Files and Printers - Ubuntu as a Server - Ubuntu Unleashed 2017 Edition (2017)

Ubuntu Unleashed 2017 Edition (2017)

Part IV: Ubuntu as a Server

Chapter 23. Sharing Files and Printers


In This Chapter

Image Using the Network File System

Image Putting Samba to Work

Image Network and Remote Printing with Ubuntu

Image References


In the early days of computing, file and printer sharing was pretty much impossible because of the lack of good networking standards and interoperability. If you wanted to use a printer connected to another computer, you had to save the file to a floppy disk and walk to the other computer. Sometimes people do the same thing today using a USB thumb drive or by emailing the file. However, there are better ways.

Both file and printer sharing are important because it is not unusual for someone to own more than one computer. Whether you want to share photographs among various computers or have a central repository available for collaboration, file sharing is an important part of the information age. Alongside this is the need to be able to share printers; after all, people do not want to have to plug and unplug a computer to a printer just so they can print out a quick letter.

Whatever your reasons for needing to share files and printers across a network, you find out how to do both in this chapter. This chapter shows you how you can share files using the popular UNIX NFS protocol and the more Windows-friendly Samba system. You also find out how to configure network-attached printers with interfaces such as JetDirect. The chapter covers both graphical and command-line tools, so you should find something to suit the way you work.


Caution

By default, Ubuntu ships with all its network ports blocked. That is, it does not listen to any requests on any network ports when it is first installed. To configure the firewall, use Uncomplicated Firewall (UFW) as described in Chapter 20, “Securing Your Machines.”


Using the Network File System

Network File System (NFS) is the protocol developed by Sun Microsystems that enables computers to use a remote file system as if it were a real part of the local machine. A common use of NFS is to allow users’ /home directories to appear on every local machine they use, thus eliminating the need to have physical home directories. This opens up hot desking and other flexible working arrangements, especially because no matter where the users are, their /home directories follow them around.

Another popular use for NFS is to share binary files between similar computers. If you have a new version of a package that you want all machines to have, you have to upgrade only on the NFS server, and all hosts running the same version of Ubuntu have the same upgraded package.

Installing and Starting or Stopping NFS

NFS is not installed by default on Ubuntu, so you need to install the nfs-kernel-server package. NFS itself consists of several programs that work together. One is portmap, which maps NFS requests to the correct daemon. Two others are nfsd, which is the NFS daemon, and mountd, which controls the mounting and unmounting of file systems.

Ubuntu automatically adds NFS to the system startup scripts, so it will always be available after you have configured it. To check this, use the command sudo /etc/init.d/nfs-kernel-server status and you see that the service is running. If you need to manually start the NFS server, use the following command:

Click here to view code image

matthew@seymour:~$ sudo /etc/init.d/nfs-kernel-server start
* Exporting directories for NFS kernel daemon: [ OK ]
Starting NFS kernel daemon: [ OK ]

In this example, NFS has been started. Use stop to stop the service or restart to restart the service. This approach to controlling NFS proves handy, especially after configuration changes have been made. See the next section on how to configure NFS support on your Ubuntu system.

NFS Server Configuration

You can configure the NFS server by editing the /etc/exports file. This file is similar to the /etc/fstab file in that it is used to set the permissions for the file systems being exported. The entries look like this:

Click here to view code image

/file/system yourhost(options) *.yourdomain.com(options) 192.168.0.0/24(options)

This shows three common clients to which to share /file/system. The first, yourhost, shares /file/system to just one host. The second, .yourdomain.com, uses the asterisk (*) as a wildcard to enable all hosts in yourdomain.com to access /file/system. The third share enables all hosts of the Class C network, 192.168.0.0, to access /file/share. For security, it is best not to use shares such as the last two across the Internet, because all data will be readable by any network the data passes by.

Table 23.1 shows some common options.

Image

TABLE 23.1 /etc/fstab Options

The following is an example of an /etc/exports file:

Click here to view code image

# /etc/exports: the access control list for filesystems which may be exported
# to NFS clients. See exports(5).
/home/matthew 192.168.0.0/24(rw,no_root_squash)

This file exports (makes available) /home/matthew to any host in 192.168.0.* and allows users to read from and write to /home/matthew.

After you have finished with the /etc/exports file, the following command exports all the file systems in the /etc/exports file to a list named xtab under the /var/lib/nfs directory, which is used as a guide for mounting when a remote computer asks for a directory to be exported:

Click here to view code image

matthew@seymour:~$ sudo exportfs -a

The -r option stands for re-export and tells the command to reread the entire /etc/exports file and (re)mount all the entries. You can also use the exportfs command to export specific files temporarily. Here’s an example using exportfs to export a file system:

Click here to view code image

matthew@seymour:~$ /usr/sbin/exportfs -o async yourhost:/usr/tmp

This command exports /usr/tmp to yourhost with the async option.

Be sure to restart the NFS server after making any changes to /etc/exports. If you prefer, you can use Ubuntu’s shares-admin graphical client to set up NFS from the GUI. Search for personal file sharing in the Dash to start. Fill in the required information and off you go. You still need to install some packages on Ubuntu for this to work, the same ones mentioned earlier in this chapter in the Installing and Starting or Stopping NFS section and below in NFS Client Configuration.

NFS Client Configuration

To configure your host as an NFS client (to acquire remote files or directories), you need to ensure that you have the nfs-common package installed, to be able to access NFS shares. After you’ve installed this, edit the /etc/fstab file as you would to mount any local file system. However, instead of using a device name to be mounted (such as /dev/sda1), enter the remote hostname and the desired file system to be imported. For example, one entry might look like this:

Click here to view code image

# Device Mount Point Type Options Freq Pass
yourhost:/home/share /export/share none nfs 0 0


Note

If you use autofs on your system, you need to use proper autofs entries for your remote NFS mounts. See the Section 5 man page for autofs by entering man 5 autofs at the command line.


You can also use the mount command, as root, to quickly attach a remote directory to a local file system by using a remote host’s name and exported directory. For example:

Click here to view code image

matthew@seymour:~$ sudo mount -t nfs 192.168.2.67:/music /music

After you press Enter, the entire remote directory appears on your file system. You can verify the imported file system using the df command, as follows:

Click here to view code image

matthew@seymour:~$ df
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/hda2 18714368 9642600 8121124 55% /
/dev/hda1 46636 13247 30981 30% /boot
none 120016 0 120016 0% /dev/shm
192.168.2.67:/music 36875376 20895920 14106280 60% /music

Make sure that the desired mount point exists before using the mount command. When finished using the directory (perhaps for copying backups), you can use the umount command to remove the remote file system. Note that if you specify the root directory (/) as a mount point, you cannot unmount the NFS directory until you reboot (because Linux complains that the file system is in use).

Putting Samba to Work

Samba uses the Session Message Block (SMB) protocol to enable the Windows operating system (or any operating system) to access Linux files. Using Samba, you can make your Ubuntu machine look just like a Windows computer to other Windows computers on your network. You do not need to install Windows on your PC.

Samba is a complex program. Although Samba is complex, setting it up and using it does not have to be difficult. There are many options, which account for some of Samba’s complexity. Depending on what you want, Samba’s use can be as easy or as difficult as you would like it to be.

Fortunately, Ubuntu includes a very easy way to access files on a Windows network share by default. To start, search for Network in the Dash and open it. If there are other computers on the network with shared files using Windows or Samba, you will see a Windows Network icon that, when double-clicked, shows you all Windows domains or workgroups found on your network. Just double-click any computer icon there to access shares and files.

To share from your Ubuntu desktop, right-click a folder you own while using the file browser, most likely one in your /home/username directory, and select Local Network Share. You are given a chance to confirm your desire to share the folder and give it a name. Sharing gives others the permission to view, but not necessarily to create or delete files, although those permissions are also available from this menu. If you do not have the Windows sharing service already installed on your computer, Ubuntu prompts you for permission to install it.


Note

Most Ubuntu users will not need the information contained in the rest of this section because installing the sharing service also takes care of the configuration and, as a result, everything should just work.


For greater configurability and control, follow these instructions:

1. Install Samba and the GUI configuration application by installing these packages: samba, samba-common, system-config-samba, python-glade2, gksu.

2. From the Dash, search for samba and open it.

3. In the Samba configuration application, open Preferences > Server Settings. Here you will configure basic settings like setting Workgroup to the name of your Windows Workgroup name on your network and giving a description of your computer to be seen by others on the network. You can change the computer’s network security options for Samba here as well, but the default settings are good.

4. Next, also in the Samba configuration application, open Preferences > Samba Users. Click Add User. You need to enter the details for a) the user on this Ubuntu machine who will be given privileges to use Samba to view files on other network computers and b) a Windows username that will be used when accessing this Ubuntu machine’s files from a Windows machine on the network and c) a password that will be required with the Windows username when accessing files on this Ubuntu computer from a Windows machine.

5. Restart Samba from the terminal to finish: sudo restart smbd && sudo restart nmbd.

You can share a folder from the Samba configuration application, set directory, name, read/write permissions, and access users.

For even greater configurability, read through the editable configuration file at /etc/samba/smb.conf. It is well commented and clear and explained in greater detail below.

To learn more about Samba, see https://www.samba.org. This section delves into the basics of configuring Samba, and you should first read how to manually configure Samba to get an understanding of how the software works.

When you install Samba, it is a good idea to also install the samba-doc and samba-doc-pdf packages because they contain extensive documentation in text, PDF, and HTML format. After you install it, you can find this documentation in /usr/share/doc/samba*/doc. If you install Samba using your Ubuntu disc, you can find a large amount of documentation in the directory tree starting at /usr/share/doc/samba-doc or /usr/share/doc/samba-doc-pdf in several formats, including PDF, HTML, and text, among others. Altogether, almost 3MB of documentation is included with the source code.

After installing Samba, you can either create the file /etc/samba/smb.conf or use the smb.conf file supplied with Samba, which is located by default under the /etc/samba directory with Ubuntu. You can find nearly a dozen sample configuration files under the /usr/share/doc/samba*/examples directory.


Note

Depending on your needs, smb.conf can be a simple file of fewer than 20 lines or a huge file spanning many pages of text. If your needs are complex, I suggest you browse through The Official Samba HOWTO and Reference Guide, or TOSHARG. You can find this helpful guide at http://samba.org/samba/docs/man/Samba4-HOWTO/.


Manually Configuring Samba with /etc/samba/smb.conf

The /etc/samba/smb.conf file is broken into sections. Each section is a description of the resource shared (share) and should be titled appropriately. The three special sections are as follows:

Image [global]—Establishes the global configuration settings (defined in detail in the smb.conf man page and Samba documentation, found under the /usr/share/doc/samba/docs directory)

Image [homes]—Shares users’ /home directories and specifies directory paths and permissions

Image [printers]—Handles printing by defining shared printers and printer access

Each section in your /etc/samba/smb.conf configuration file should be named for the resource being shared. For example, if the resource /usr/local/programs is being shared, you could call the section [programs]. When Windows sees the share, it is called by whatever you name the section (programs in this example). The easiest and fastest way to set up this share is with the following example from smb.conf:

[programs]
path = /usr/local/programs
writeable = true

This bit shares the /usr/local/programs directory with any valid user who asks for it and makes that directory writeable. It is the most basic share because it sets no limits on the directory.

Here are some parameters you can set in the sections:

Image Requiring a user to enter a password before accessing a shared directory

Image Limiting the hosts allowed to access the shared directory

Image Altering permissions users are allowed to have on the directory

Image Limiting the time of day during which the directory is accessible

The possibilities are almost endless. Any parameters set in the individual sections override the parameters set in the [global] section. The following section adds a few restrictions to the [programs] section:

[programs]
path = /usr/local/programs
writeable = true
valid users = mhelmke
browseable = yes
create mode = 0700


Note

You can spell it as writeable or writable; either variant will work. Both spellings are used in this chapter.


The valid users entry limits userid to just mhelmke. All other users can browse the directory because of the browseable = yes entry, but only mhelmke can write to the directory. Any files created by ahudson in the directory give ahudson full permissions, but no one else will have access to the file. This is the same as setting permissions with the chmod command. Again, there are numerous options, so you can be as creative as you want when developing sections.

Setting Global Samba Behavior with the [global] Section

The [global] section set parameters establishes configuration settings for all of Samba. If a given parameter is not specifically set in another section, Samba uses the default setting in the [global] section. The [global]section also sets the general security configuration for Samba. The [global] section is the only section that does not require the name in brackets.

Samba assumes that anything before the first bracketed section not labeled [global] is part of the global configuration. (Using bracketed headings in /etc/samba/smb.conf makes your configuration file more readable.) The following sections discuss common Samba settings to share directories and printers. You will then see how to test your Samba configuration.

Sharing Home Directories Using the [homes] Section

The [homes] section shares out Ubuntu /home directories for the users. The /home directory is shared automatically when a user’s Windows computer connects to the Linux server holding the /home directory. The one problem with using the default configuration is that the users see all the configuration files (such as .profile and others with a leading period in the filename) that they normally wouldn’t see when logging on through Linux. One quick way to avoid this is to include a path option in the [homes] section. To use this solution, any users who require a Samba share of their /home directory need a separate “home directory” to act as their Windows /home directory.

This setting specifies that the directory named share under each user’s directory is the shared Samba directory. The corresponding manual smb.conf setting to provide a separate “home directory” looks like this:

Click here to view code image

[homes]
comment = Home Directories
path = /home/%u/share
valid users = %S
read only = No
create mask = 0664
directory mask = 0775
browseable = No

If you have a default [homes] section, the share shows up in the user’s Network Neighborhood as the user’s name. When the user connects, Samba scans the existing sections in smb.conf for a specific instance of the user’s /home directory. If there is not one, Samba looks up the username in /etc/passwd. If the correct username and password have been given, the home directory listed in /etc/passwd is shared out at the user’s /home directory. Typically, the [homes] section looks like this. (The browseable = no entry prevents other users from being able to browse your /home directory and is a good security practice.)

[homes]
browseable = no
writable = yes

This example shares out the /home directory and makes it writeable to the user. Here’s how you specify a separate Windows /home directory for each user:

Click here to view code image

[homes]
browseable = no
writable = yes
path = /path/to/windows/directories

Sharing Printers by Editing the [printers] Section

The [printers] section works much like the [homes] section but defines shared printers for use on your network. If the section exists, users have access to any printer listed in your Ubuntu /etc/printcap file.

Like the [homes] section, when a print request is received, all the sections are scanned for the printer. If no share is found (with careful naming, there should not be unless you create a section for a specific printer), the /etc/printcap file is scanned for the printer name that is then used to send the print request.

For printing to work properly, you must correctly set up printing services on your Ubuntu computer. A typical [printers] section looks like this:

[printers]
comment = Ubuntu Printers
browseable = no
printable = yes
path = /var/spool/samba

The /var/spool/samba is a spool path set just for Samba printing.

Testing Samba with the testparm Command

After you have created your /etc/smb.conf file, you can check it for correctness by using the testparm command. This command parses through your /etc/smb.conf file and checks for any syntax errors. If none are found, your configuration file will probably work correctly. It does not, however, guarantee that the services specified in the file will work. It is merely making sure that the file is correctly written.

As with all configuration files, if you are modifying an existing, working file, it is always prudent to copy the working file to a different location and modify that file. Then, you can check the file with the testparm utility. The command syntax is as follows:

Click here to view code image

matthew@seymour:~$ sudo testparm /path/to/smb.conf.back-up
Load smb config files from smb.conf.back-up
Processing section "[homes]"
Processing section "[printers]"
Loaded services file OK.

This output shows that the Samba configuration file is correct, and as long as all the services are running correctly on your Ubuntu machine, Samba should be working correctly. Now copy your old smb.conf file to a new location, put the new one in its place, and restart Samba with the command sudo smbd restart. Your new or modified Samba configuration should now be in place.

Starting, Stopping, and Restarting the smbd Daemon

After your smb.conf file is correctly configured, you might want to start, stop, or restart your Samba server daemon. You can do this with the /usr/sbin/smbd command, which (with no options) starts the Samba server with all the defaults. The most common option you will change in this command is the location of the smb.conf file; you change this option if you don’t want to use the default location /etc/smb/smb.conf. The -s option enables you to change the smb.conf file Samba uses; this option is also useful for testing whether a new smb.conf file actually works. Another useful option is the -l option, which specifies the log file Samba uses to store information.

To start, stop, or restart Samba from the command line, use this, replacing start with either stop or restart as appropriate:

Click here to view code image

matthew@seymour:~$ sudo start smbd

Using the smbstatus Command

The smbstatus command reports on the current status of your Samba connections. The syntax is as follows:

/usr/bin/smbstatus [options]

Table 23.2 shows some of the available options.

Image

TABLE 23.2 smbstatus Options

Connecting with the smbclient Command

The smbclient command allows users on other Linux hosts to access your smb shares. You cannot mount the share on your host, but you can use it in a way that is similar to an FTP client. Several options can be used with the smbclient command. The most frequently used is -I followed by the IP address of the computer to which you are connecting. The smbclient command does not require root access to run:

Click here to view code image

matthew@seymour:~$ smbclient -I 10.10.10.20 -Uusername%password

This gives you the following prompt:

Click here to view code image

smb: <current directory on share>

From here, the commands are almost identical to the standard UNIX/Linux FTP commands. Note that you can omit a password on the smbclient command line. You are then prompted to enter the Samba share password.

Mounting Samba Shares

There are two ways to mount Samba shares to your Linux host. Mounting a share is the same as mounting an available media partition or remote NFS directory except that the Samba share is accessed using SMB. The first method uses the standard Linux mount command:

Click here to view code image

matthew@seymour:~$ sudo mount -t smbfs //10.10.10.20/homes /mount/point -o
username=heather,dmask=777,\ fmask=777


Note

You can substitute the IP address for hostname if your name service is running or the host is in your /etc/hosts file.


The preceding command mounts heather’s /home directory on your host and gives all users full permissions to the mount. The permissions are equal to the permissions on the chmod command.

The second method produces the same results using the smbmount command, as follows:

Click here to view code image

matthew@seymour:~$ sudo smbmount //10.10.10.20/homes /mount/point -o
username=heather,dmask-777,\ fmask=777

To unmount the share, use the following standard command:

Click here to view code image

matthew@seymour:~$ sudo umount /mount/point

You can also use these mount commands to mount true Windows client shares to your Ubuntu host. Using Samba, you can configure your server to provide any service Windows can serve, and no one but you will ever know.

Network and Remote Printing with Ubuntu

Chapter 1, “Installing Ubuntu and Post-Installation Configuration,” discusses how to set up and configure local printers and the associated print services. This section covers configuring printers for sharing and access across a network.

Offices all over the world benefit from using print servers and shared printers. It is a simple thing to do and can bring real productivity benefits, even in small settings.

Creating Network Printers

Setting up remote printing service involves configuring a print server and then creating a remote printer entry on one or more computers on your network. This section introduces a quick method of enabling printing from one Linux workstation to another Linux computer on a LAN. You also learn about SMB printing using Samba and its utilities. Finally, this section discusses how to configure network-attached printers and use them to print single or multiple documents.

Enabling Network Printing on a LAN

If the computer with an attached printer is using Ubuntu and you want to set up the system for print serving, use the system-config-printer client to create a new printer, which is available in the menu at System, Administration, Printing.

First, install any printers you have to the server as discussed in Chapter 1, “Installing Ubuntu and Post-Installation Configuration.” (Click Add and wait a moment, and it is likely the printer will be detected automatically; it is probably easy enough that you don’t have to look up what is written in the other chapter.)

Next, open Server, Settings and enable Publish Shared Printers Connected to This System. Click OK. Right-click any printer’s icon and select Share. That’s it. Most users will not need the information in the rest of this section, even to enable access to Common UNIX Printing System (CUPS) via the web interface.

To enable sharing manually, edit your /etc/cups/cupsd.conf file. Look for the section that begins with <Location /> and modify it so that it reads as follows:

<Location />
Order Deny,Allow
Deny From All
Allow From 127.0.0.1
Allow From 192.168.0.*
</Location>

This tells CUPS to share your printers across the network 192.168.0.*, for example. Make sure to change this to match your own network settings.

Next you need to look in the same file for the section that starts:

Listen localhost:631

Modify it to show this:

Listen 631

This tells CUPS to listen on port 631 for any printer requests.

Session Message Block Printing

Printing to an SMB printer requires Samba, along with its utilities such as the smbclient and associated smbprint printing filter. You can use the Samba software included with Ubuntu to print to a shared printer on a Windows network or set up a printer attached to your system as an SMB printer. This section describes how to create a local printer entry to print to a remote shared printer using SMB.

You usually set up an SMB or shared printer under Windows operating systems through configuration settings using the Control Panel’s Network device. After enabling print sharing, reboot the computer. In the My Computer, Printers folder, right-click the name or icon of the printer you want to share and select Sharing from the pop-up menu. Set the Shared As item and then enter a descriptive shared name, such as HP2100, and a password.

You must enter a shared name and password to configure the printer when running Linux. You also need to know the printer’s workgroup name, IP address, and printer name and have the username and password on hand. To find this information, select Start, Settings, Printers, and then right-click the shared printer’s listing in the Printers window. Select Properties from the pop-up window.

You can use CUPS to configure Samba to use your printers by editing the smb.conf file.

In the [global] section enter the following lines, if they are not already there:

...
load printers = yes
printing = cups
printcap name = cups

This tells Samba to use CUPS to provide printing services. Next you need to create a new section in the smb.conf file at the end of the file, as follows:

Click here to view code image

[printers]
comment = Use this for All Printers
path = /var/spool/samba
browseable = no
public = yes
guest ok = yes
writable = no
printable = yes
printer admin = root, andrew

This publishes your printers to the network and allows others to connect to them via Windows clients.

Make sure you restart the Samba service using the command shown earlier to make Samba pick up the changes to the configuration file.

Using the Common UNIX Printing System GUI

You can use CUPS to create printer queues, get print server information, and manage queues by launching a browser (such as Firefox) and browsing to http://localhost:631. CUPS provides a web-based administration interface, as shown in Figure 23.1.

Image

FIGURE 23.1 Use the web-based CUPS administrative interface to configure and manage printing.

If you click the Administration tab in the browser page, you can start configuring your printers, as shown in Figure 23.2.

Image

FIGURE 23.2 Select the Administration tab to perform printer administration with CUPS.

Creating a CUPS Printer Entry

This section provides a short example of creating a Linux printer entry using CUPS’s web-based interface. Use the CUPS interface to create a printer and device queue type (such as local, remote, serial port, or Internet); then you enter a device uniform resource identifier (URI), such as lpd://192.168.2.35/lp, which represents the IP address of a remote UNIX print server and the name of the remote print queue on the server. You also need to specify the model or make of printer and its driver. A Printers page link enables you to print a test page, stop the printing service, manage the local print queue, modify the printer entry, or add another printer.

In the Admin page, click the Add Printer button and then enter the username and password of someone on this computer who has sudo privileges. You may then select from detected local printers, discovered network printers, or the type of printer for which you may want to enter details manually.

CUPS offers many additional features and after it is installed, configured, and running, provides transparent traditional UNIX printing support for Ubuntu.


Note

To learn more about CUPS and to get a basic overview of the system, browse to www.cups.org/.


Avoiding Printer Support Problems

Troubleshooting printer problems can prove frustrating, especially if you find that your new printer is not working properly with Linux. Keep in mind, however, that nearly all printers on the market today work with Linux. However, some vendors have higher batting averages in the game of supporting Linux. If you care to see a scorecard, browse to www.linuxprinting.org/vendors.html.

All-in-One (Print/Fax/Scan) Devices

Problematic printers, or printing devices that might or might not work with Ubuntu, include multifunction (or all-in-one) printers that combine scanning, faxing, and printing services. You should research any planned purchase and avoid any vendor unwilling to support Linux with drivers or development information.

One shining star in the field of Linux support for multifunction printers is the HP support of the HP OfficeJet Linux driver project at http://hpoj.sourceforge.net/. Printing and scanning are supported on many models, with fax support in development.

Using USB and Legacy Printers

Other problems can arise because of a lack of a printer’s Universal Serial Bus (USB) vendor and device ID information—a problem shared by some USB scanners under Linux. For information about USB printer support, check with the Linux printing folks (at the URL in the start of this section) or with the Linux USB project at www.linux-usb.org/.

Although many newer printers require a USB port, excellent support still exists for legacy parallel-port (IEEE-1284) printers with Linux, enabling sites to continue to use older hardware. You can take advantage of Linux workarounds to set up printing even if the host computer does not have a traditional parallel printer port or if you want to use a newer USB printer on an older computer.

For example, to host a parallel-port-based printer on a USB-only computer, attach the printer to the computer using an inexpensive USB-to-parallel converter. USB-to-parallel converters typically provide a Centronics connector; one end of that connector is plugged in to the older printer, and the other end is plugged in to a USB connector. The USB connector is then plugged in to your hub, desktop, or notebook USB port. You can use an add-on PCI card to add USB support for printing (and other devices) if the legacy computer does not have a built-in USB port. Most PCI USB interface cards add at least two ports, and you can chain devices via a hub.


Related Ubuntu and Linux Commands

The following commands can help you manage printing services:

Image accept—Controls print job access to the CUPS server via the command line

Image cancel—Cancels a print job from the command line

Image disable—Control printing from the command line

Image enable—Controls CUPS printers

Image lp—Sends a specified file to the printer and allows control of the print service

Image lpc—Displays the status of printers and print service at the console

Image lpq—Views print queues (pending print jobs) at the console

Image lprm—Removes print jobs from the print queue via the command line

Image lpstat—Displays printer and server status


References

Image https://help.ubuntu.com/community/SettingUpNFSHowTo—Ubuntu community documentation for setting up NFS

Image https://help.ubuntu.com/community/Samba—Ubuntu community documentation for setting up Samba

Image www.samba.org/—Base entry point for getting more information about Samba and using the SMB protocol with Linux, UNIX, Mac OS X, and other operating systems

Image www.cups.org/—A comprehensive repository of CUPS software and information

Image www.pwg.org/ipp/—Home page for the Internet Printing Protocol standards