Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Absolute BSD - The Ultimate Guide To FreeBSD (2002).pdf
Скачиваний:
25
Добавлен:
17.08.2013
Размер:
8.15 Mб
Скачать

Unique Password on a Standalone System

You would use something like the following if you had a machine named desktop with a password−protected share. Many Windows 9x systems have this sort of password−protection feature.

...............................................................................................

#I have a share on my desktop with a separate password

[desktop:mlucas]

password=$$1725a5038393e12ee

...............................................................................................

Accessing a Second Domain

In this example, we're trying to access a separate domain, named development. This domain has a separate username and password than our default:

...............................................................................................

#development is in a different NT domain, with a shared username [development]

workgroup=EXAMPLE2

username=support

...............................................................................................

CIFS File Ownership

Ownership of files between UNIX and Windows systems can be problematic. For one thing, your UNIX usernames probably won't map to Windows user−names, and UNIX has a different permissions scheme than Windows.

Since you're using a single Windows username to access the share, you have whatever access that account has to the Windows resources, but you should assign the proper UNIX permissions for that share. By default, mount_smbfs assigns the new share the same permissions as the mount point used. The directory /home/mwlucas/smbmount in our example is owned by mwlucas, in the group mwlucas, and has mode 755. These permissions say that I can edit what's in this directory, but no other user can.

[1]In FreeBSD 4.4 and later, these tools are included in the base operating system.

Serving Windows File Shares

Just as FreeBSD can access CIFS shares, it can also serve them to CIFS clients (such as Windows) with Samba. You can find Samba in /usr/ports/net/samba. You'll find the Samba Web site a t h t t p : / / w w w . s a m b a . o r g / , a n d a u s e f u l t u t o r i a l a t http://www.linux.org/docs/ldp/howto/HOWTO−INDEX/howtos.html. There are entire books written about Samba, and I cannot possibly do it justice in just a few paragraphs, so we'll end our Samba discussion here.

481