Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Linux Timesaving Techniques For Dummies.pdf
Скачиваний:
59
Добавлен:
15.03.2015
Размер:
15.98 Mб
Скачать

Hooking Everyone Up to the Printer

69

3. Click Finish.

4. If prompted, enter your Samba user name and password and click OK.

After a short delay, a window appears (on your Windows desktop) displaying the contents of your Linux home directory. You can drag and drop files, copy them, print them, or create new ones. Just remember: The Samba-hosted files you see on your Windows computer are actually stored on your Linux computer.

7. Type /mnt/cdrom in the Path field (if you’re running SuSE Linux, type /media/cdrom instead).

8. Click Commit Changes (near the top of the page).

Now you should be able to remotely access your CD drive from another computer. Note that you still have to mount the CD (mount /dev/cdrom) from your Linux host before others can see it. See the section, “Plugging In to Remote Data with Linux Programs Quickly” later in this technique for more details.

Sharing Linux files and directories with other computers

The standard configuration that SWAT chooses exposes home directories (and all printers). SWAT makes it easy to create new SMB shares for other directories (even other devices) on your Linux computer. To share your CD drive with others, follow these steps:

1. To connect to SWAT, open your Web browser and jump to http://localhost:901.

2. Log in as user root when prompted.

3. Click Shares.

The share manager page appears.

4. Type CD-Drive into the field next to the Create

Share button.

You can choose any name you like for the share name, but don’t get too fancy. In particular, don’t include a forward slash or a backward slash in your share name — SWAT will let you do it, but you won’t be able to mount that share from another computer.

5. Click Create Share.

The share parameter page appears.

6. Enter a descriptive name (such as Shared

CD Drive) in the Comment field.

Hooking Everyone Up to the Printer

Samba can expose printers as easily as it shares files and directories. In fact, Samba automatically shares your Linux printers with anyone in your SMB workgroup. You can also access (from Linux) printers that are connected to Windows computers. In this section, we show you how to manage Samba printer shares.

Sharing Linux printers with SWAT

If you have any printers connected to your Linux computer (and you’ve configured them), Samba automatically shares them with other computers in your workgroup; you don’t have to expose them yourself. Samba discovers the printers on your computer by reading the /etc/printcap file. Normally, you don’t edit the printcap file yourself; you let a KDE or GNOME helper do that for you.

If you have a printer that you don’t want to share, you can use SWAT to hide it from other computers:

1. To connect to SWAT, open your Web browser and jump to http://localhost:901.

2. Log in as user root when prompted.

3. Click Printers.

The printer manager page appears.

70 Technique 11: Sharing Files and Printers in a Windows World

4. Click Choose Printer.

The printer parameters page appears.

5. Scroll to the bottom of the page and change

Available to No.

6. Click Commit Changes.

Using a Windows printer from Linux

Using a remote printer makes life much easier when you’re working on a network. Sharing resources saves a small company not only dollars, but also lots of time in potential maintenance. Sharing a printer means that if Freddie’s printer breaks, he can use Roberta’s printer and still get his work done on time without shuffling disks, data, or cables.

If you’re accessing Windows-hosted resources from a Linux host, you don’t need to install the Samba server — just the client. Now, with a few quick clicks, you’ll have access to a network printer. Follow these steps:

1. Click the printer icon on your taskbar.

The GNOME Print Manager window opens (see Figure 11-1).

2. If you have no printers loaded, you’re asked if you want to run the configuration tool. Click OK.

Figure 11-1: The GNOME Print Manager.

3. You’re prompted for the superuser password.

Enter the password and click OK.

4. Click New.

After a short delay, the Add a New Print Queue dialog opens, as shown in Figure 11-2.

Figure 11-2: The Add a New Print Queue dialog.

5.Click Forward.

6.When the next dialog opens, type in a name and a description for your printer. Click Forward again.

7.In the next dialog (see Figure 11-3), select the SMB queue type and highlight the network share that you want to use.

Figure 11-3: Select the SMB queue type and highlight the network share.

8. Click Forward.

The Authentication dialog opens, as shown in Figure 11-4.

Соседние файлы в предмете Операционные системы