Difference between revisions of "Files and File Sharing/9.2"

From PC-BSD Wiki
Jump to: navigation, search
m
(31 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 
<noinclude>{{NavHeader|back=Multimedia|forward=MythTV}}</noinclude>
 
<noinclude>{{NavHeader|back=Multimedia|forward=MythTV}}</noinclude>
 +
 
This section describes the various file managers that are available for managing the files on your PC-BSD system. It then shows how you can configure your PC-BSD system to share files with other systems in your network using Samba.
 
This section describes the various file managers that are available for managing the files on your PC-BSD system. It then shows how you can configure your PC-BSD system to share files with other systems in your network using Samba.
  
 
== File Managers and File Structure ==
 
== File Managers and File Structure ==
  
Depending upon which desktops you have installed, different graphical file manager utilities are available for PC-BSD. Note that you don't need to be logged into a window manager to use an installed file manager. For example, if KDE is installed, you can run its file manager from any desktop by typing '''dolphin'''. The supported desktops provide their own file managers while most of the unsupported desktops assume that you will install your favourite file manager. Table 8.6a summarizes the available file managers and indicates which desktop they are installed with. Some file managers can be installed independent of a desktop using AppCafe® to install the PBI. Once a file manager is installed, type its name if you wish to run it from another desktop.
+
Depending upon which window managers you have installed, different graphical file manager utilities may already be installed for you. You do not need to be logged into a specific window manager to use an installed file manager. For example, if KDE is installed, you can run its file manager from any window manager by typing '''dolphin'''. KDE, GNOME, LXDE, and XFCE install their own file managers while most of the unsupported desktops assume that you will install your favorite file manager. Table 9.3a summarizes the available file managers and indicates which desktop they are installed with. Some file managers can be installed independent of a desktop using [[Using AppCafe® | AppCafe®]] to install the PBI. Once a file manager is installed, type its name if you wish to run it from another desktop.
  
'''Table 8.6a: Available File Managers'''
+
'''Table 9.3a: Available File Managers'''
  
 
{{Tbl-init}}
 
{{Tbl-init}}
{{Tbl-title|'''File Manager'''}}  
+
{{Tbl-title|'''File Manager'''}}
 
{{Tbl-title|'''Desktop/PBI'''}}
 
{{Tbl-title|'''Desktop/PBI'''}}
 
{{Tbl-title|'''Screenshots'''}}
 
{{Tbl-title|'''Screenshots'''}}
Line 15: Line 16:
 
|-
 
|-
 
{{Tbl-cell|row=1|dolphin}}
 
{{Tbl-cell|row=1|dolphin}}
{{Tbl-cell|row=1|KDE}}
+
{{Tbl-cell|row=1|[[KDE4|KDE]]}}
{{Tbl-cell|row=1|http://dolphin.kde.org/features.html}}
+
{{Tbl-cell|row=1|content={{citelink|url=http://dolphin.kde.org/features.html|txt=http://dolphin.kde.org/features.html}}}}
 
{{Tbl-cell|row=1|}}
 
{{Tbl-cell|row=1|}}
 
|-
 
|-
 
{{Tbl-cell|row=2|emelfm2}}
 
{{Tbl-cell|row=2|emelfm2}}
 
{{Tbl-cell|row=2|PBI}}
 
{{Tbl-cell|row=2|PBI}}
{{Tbl-cell|row=2|http://emelfm2.net/wiki/ScreenShots}}
+
{{Tbl-cell|row=2|content={{citelink|url=http://emelfm2.net/wiki/ScreenShots|txt=http://emelfm2.net/wiki/ScreenShots}}}}
 
{{Tbl-cell|row=2|}}
 
{{Tbl-cell|row=2|}}
 
|-
 
|-
 
{{Tbl-cell|row=3|/usr/local/GNUstep/Apps/FSViewer.app/FSViewer}}
 
{{Tbl-cell|row=3|/usr/local/GNUstep/Apps/FSViewer.app/FSViewer}}
{{Tbl-cell|row=3|Window Maker}}
+
{{Tbl-cell|row=3|[[Window Maker]]}}
{{Tbl-cell|row=3|http://www.bayernline.de/~gscholz/linux/fsviewer/}}
+
{{Tbl-cell|row=3|content={{citelink|url=http://www.bayernline.de/~gscholz/linux/fsviewer/|txt=http://www.bayernline.de/~gscholz/linux/fsviewer/}}}}
 
{{Tbl-cell|row=3|}}
 
{{Tbl-cell|row=3|}}
 
|-
 
|-
 
{{Tbl-cell|row=4|krusader}}
 
{{Tbl-cell|row=4|krusader}}
 
{{Tbl-cell|row=4|PBI}}
 
{{Tbl-cell|row=4|PBI}}
{{Tbl-cell|row=4|http://www.krusader.org/screenshots.php}}
+
{{Tbl-cell|row=4|content={{citelink|url=http://www.krusader.org/screenshots.php|txt=http://www.krusader.org/screenshots.php}}}}
 
{{Tbl-cell|row=4|}}
 
{{Tbl-cell|row=4|}}
 
|-
 
|-
 
{{Tbl-cell|row=5|mucommander}}
 
{{Tbl-cell|row=5|mucommander}}
 
{{Tbl-cell|row=5|PBI}}
 
{{Tbl-cell|row=5|PBI}}
{{Tbl-cell|row=5|http://www.mucommander.com/screenshots.php}}
+
{{Tbl-cell|row=5|content={{citelink|url=http://www.mucommander.com/screenshots.php|txt=http://www.mucommander.com/screenshots.php}}}}
 
{{Tbl-cell|row=5|}}
 
{{Tbl-cell|row=5|}}
 
|-
 
|-
 
{{Tbl-cell|row=6|nautilus}}
 
{{Tbl-cell|row=6|nautilus}}
{{Tbl-cell|row=6|GNOME}}
+
{{Tbl-cell|row=6|[[GNOME2|GNOME]]}}
{{Tbl-cell|row=6|http://live.gnome.org/Nautilus/Screenshots}}
+
{{Tbl-cell|row=6|content={{citelink|url=http://live.gnome.org/Nautilus/Screenshots|txt=http://live.gnome.org/Nautilus/Screenshots}}}}
 
{{Tbl-cell|row=6|}}
 
{{Tbl-cell|row=6|}}
 
|-
 
|-
 
{{Tbl-cell|row=7|pcmanfm}}
 
{{Tbl-cell|row=7|pcmanfm}}
{{Tbl-cell|row=7|LXDE or PBI}}
+
{{Tbl-cell|row=7|[[LXDE]] or PBI}}
{{Tbl-cell|row=7|http://lxde.org/easy_fast_file_management_pcmanfm}}
+
{{Tbl-cell|row=7|content={{citelink|url=http://lxde.org/easy_fast_file_management_pcmanfm|txt=http://lxde.org/easy_fast_file_management_pcmanfm}}}}
 
{{Tbl-cell|row=7|}}
 
{{Tbl-cell|row=7|}}
 
|-
 
|-
 
{{Tbl-cell|row=8|thunar}}
 
{{Tbl-cell|row=8|thunar}}
{{Tbl-cell|row=8|XFCE or PBI}}
+
{{Tbl-cell|row=8|[[XFCE4|XFCE]] or PBI}}
{{Tbl-cell|row=8|http://www.xfce.org/projects/thunar}}
+
{{Tbl-cell|row=8|content={{citelink|url=http://www.xfce.org/projects/thunar|txt=http://www.xfce.org/projects/thunar}}}}
 
{{Tbl-cell|row=8|unable to automount internal NTFS disks (try pcmanfm or emelfm2 instead)}}
 
{{Tbl-cell|row=8|unable to automount internal NTFS disks (try pcmanfm or emelfm2 instead)}}
 
|-
 
|-
 
{{Tbl-cell|row=9|xfe}}
 
{{Tbl-cell|row=9|xfe}}
 
{{Tbl-cell|row=9|PBI}}
 
{{Tbl-cell|row=9|PBI}}
{{Tbl-cell|row=9|http://roland65.free.fr/xfe/index.php?page=screenshots}}
+
{{Tbl-cell|row=9|content={{citelink|url=http://roland65.free.fr/xfe/index.php?page=screenshots|txt=http://roland65.free.fr/xfe/index.php?page=screenshots}}}}
 
{{Tbl-cell|row=9|}}
 
{{Tbl-cell|row=9|}}
 
|-
 
|-
Line 63: Line 64:
 
When working with files on your PC-BSD system, save your own files to your home directory. Since most of the files outside of your home directory are used by the operating system and applications, you should not delete or modify any files outside of your home directory, unless you know what you are doing.
 
When working with files on your PC-BSD system, save your own files to your home directory. Since most of the files outside of your home directory are used by the operating system and applications, you should not delete or modify any files outside of your home directory, unless you know what you are doing.
  
Table 8.6b summarizes the directory structure found on a PC-BSD system. '''man hier''' explains this directory structure in more detail.
+
Table 9.3b summarizes the directory structure found on a PC-BSD system. '''man hier''' explains this directory structure in more detail.
  
'''Table 8.6b: PC-BSD Directory Structure'''
+
'''Table 9.3b: PC-BSD Directory Structure'''
  
 
{{Tbl-init}}
 
{{Tbl-init}}
Line 86: Line 87:
 
{{Tbl-cellw| files which are used by the operating system to access devices }}
 
{{Tbl-cellw| files which are used by the operating system to access devices }}
 
|-
 
|-
{{Tbl-cellg| /etc/ }}
+
{{Tbl-cellg| /etc/ }}
 
{{Tbl-cellg| operating system configuration files }}
 
{{Tbl-cellg| operating system configuration files }}
 
|-
 
|-
 
{{Tbl-cellw| /etc/X11/ }}
 
{{Tbl-cellw| /etc/X11/ }}
{{Tbl-cellw| the xorg.conf configuration file }}
+
{{Tbl-cellw| the ''xorg.conf'' configuration file }}
 
|-
 
|-
 
{{Tbl-cellg| /etc/rc.d/ }}
 
{{Tbl-cellg| /etc/rc.d/ }}
Line 132: Line 133:
 
|-
 
|-
 
{{Tbl-cellw| /usr/pbi/ }}
 
{{Tbl-cellw| /usr/pbi/ }}
{{Tbl-cellw| contains the binaries, libraries, startup scripts, documentation, and configuration files used by instaleld PBIs }}
+
{{Tbl-cellw| contains the binaries, libraries, startup scripts, documentation, and configuration files used by installed PBIs }}
 
|-
 
|-
 
{{Tbl-cellg| /usr/local/share/fonts/ }}
 
{{Tbl-cellg| /usr/local/share/fonts/ }}
Line 159: Line 160:
 
== Samba ==
 
== Samba ==
  
[http://samba.org/ Samba] allows any operating system to share volumes using Microsoft's CIFS protocol. There are two components to Samba:
+
{{citelink|url=http://samba.org/|txt=Samba}} allows any operating system to share volumes using Microsoft's CIFS protocol. There are two components to Samba:
  
* '''client libraries:''' this allows an operating system to access existing CIFS shares. The client is built into the Windows and Mac OS X operating systems and is installed for you during the PC-BSD installation. Most Linux distros also install the Samba client; if your Linux distro does not, search its software repository.
+
* '''client libraries:''' this allows an operating system to access ''' ''existing'' ''' CIFS shares. The client is built into the Windows and Mac OS X operating systems and is installed for you during the PC-BSD installation. Most Linux distros also install the Samba client; if your Linux distro does not, search its software repository.
  
* '''server:''' this allows a computer to act like a Windows server in that it can create shares and printers that are available to any CIFS client on the same network.
+
* '''server:''' this allows a computer to act like a Windows server in that it can ''' ''create'' ''' shares and printers that are available to any CIFS client on the same network.
  
 
This section will demonstrate how to access shares using the Samba client as well as how to configure your PC-BSD system as a Samba server.
 
This section will demonstrate how to access shares using the Samba client as well as how to configure your PC-BSD system as a Samba server.
Line 169: Line 170:
 
=== Using the Samba Client ===
 
=== Using the Samba Client ===
  
Since the Samba client libraries are pre-installed for you, you simply have to decide which utility you prefer to access the Windows shares on your network. Remember, if a desktop is installed, you do not have to be logged into that desktop in order to use that utility.
+
Since the Samba client libraries are pre-installed for you, you simply have to decide which utility you prefer to access existing Windows shares on your network. If a desktop is installed, you do not have to be logged into that desktop in order to use that utility.
  
Table 8.6c summarizes the available utilities (type a utility's name to launch it in any desktop), which desktop it installs with and whether or not a separate PBI is available, and a short description of how to access the available shares using that utility.
+
Table 9.3c summarizes the available utilities (type a utility's name to launch it in any desktop), which desktop it installs with and whether or not a separate PBI is available, and a short description of how to access the available shares using that utility.
  
'''Table 8.6c: Utilities that Support Windows Shares'''
+
'''Table 9.3c: Utilities that Support Windows Shares'''
  
 
{{Tbl-init}}
 
{{Tbl-init}}
 
{{Tbl-title|'''Utility'''}}
 
{{Tbl-title|'''Utility'''}}
{{Tbl-title|'''Desktop/PBI'''}}  
+
{{Tbl-title|'''Desktop/PBI'''}}
{{Tbl-title|'''How to Access Existing Shares'''}}  
+
{{Tbl-title|'''How to Access Existing Shares'''}}
 
|-
 
|-
 
{{Tbl-cellw|dolphin}}
 
{{Tbl-cellw|dolphin}}
{{Tbl-cellw|KDE}}
+
{{Tbl-cellw|[[KDE4|KDE]]}}
{{Tbl-cellw|in the left frame, click on Network ➜ Samba Shares, then the Workgroup name; if the network requires a username and password to browse for shares, set this in Control Panel ➜ System Settings ➜ Sharing}}
+
{{Tbl-cellw|in the left frame, click on ''Network'' ''Samba Shares'', then the Workgroup name; if the network requires a username and password to browse for shares, set this in ''[[Control Panel]]'' ''System Settings'' ''Sharing'' while in [[KDE4|KDE]] or type '''systemsettings''' ➜ ''Sharing'' while in another desktop}}
 
|-
 
|-
 
{{Tbl-cellg|konqueror}}
 
{{Tbl-cellg|konqueror}}
{{Tbl-cellg|KDE}}
+
{{Tbl-cellg|[[KDE4|KDE]]}}
 
{{Tbl-cellg|in the location bar, type ''smb:/''}}
 
{{Tbl-cellg|in the location bar, type ''smb:/''}}
 
|-
 
|-
 
{{Tbl-cellw|krusader}}
 
{{Tbl-cellw|krusader}}
 
{{Tbl-cellw|PBI}}
 
{{Tbl-cellw|PBI}}
{{Tbl-cellw|add Local Network to toolbar by going to Settings ➜ Configure Toolbars; once in toolbar click Local Network ➜ Samba Shares}}
+
{{Tbl-cellw|add Local Network to toolbar by going to ''Settings'' ''Configure Toolbars''; once in toolbar click ''Local Network'' ''Samba Shares''}}
 
|-
 
|-
 
{{Tbl-cellg|mucommander}}
 
{{Tbl-cellg|mucommander}}
 
{{Tbl-cellg|PBI}}
 
{{Tbl-cellg|PBI}}
{{Tbl-cellg|click on Go ➜ Connect to server ➜ SMB; ; here you can input the NETBIOS name of server, name of share, name of domain (or workgroup), and the share's username and password}}
+
{{Tbl-cellg|click on ''Go'' ''Connect to server'' ''SMB''; input the NETBIOS name of server, name of share, name of domain (or workgroup), and the share's username and password}}
 
|-
 
|-
 
{{Tbl-cellw|nautilus}}
 
{{Tbl-cellw|nautilus}}
{{Tbl-cellw|GNOME}}
+
{{Tbl-cellw|[[GNOME2|GNOME]]}}
{{Tbl-cellw|click on Go ➜ Network ➜ Windows Network}}
+
{{Tbl-cellw|click on ''Go'' ''Network'' ''Windows Network''}}
 
|-
 
|-
{{Tbl-cellg|thunar}}
+
{{Tbl-cellg|smb4k}}
{{Tbl-cellg|XFCE or PBI}}
+
{{Tbl-cellg|PBI}}
{{Tbl-cellg|in the left frame, click on Network ➜ Windows Network}}
+
{{Tbl-cellg|click on the "Network Neighborhood" tab}}
 +
|-
 +
{{Tbl-cellw|thunar}}
 +
{{Tbl-cellw|[[XFCE4|XFCE]] or PBI}}
 +
{{Tbl-cellw|in the left frame, click on ''Network'' ''Windows Network'}}
 
|-
 
|-
 
|}
 
|}
Line 210: Line 215:
 
If you would like to share folders or a printer attached to your PC-BSD system with other users in your network, configure the built-in Samba server.  
 
If you would like to share folders or a printer attached to your PC-BSD system with other users in your network, configure the built-in Samba server.  
  
In order to create your shares, you need to modify Samba's configuration file, [http://samba.org/samba/docs/man/manpages-3/smb.conf.5.html smb.conf]. You can either edit this file manually or use a GUI utility such as [http://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/SWAT.html SWAT]. This section will demonstrate both methods.
+
In order to create shares, Samba's configuration file, {{citelink|url=http://samba.org/samba/docs/man/manpages-3/smb.conf.5.html|txt=smb.conf}}, needs to be modified. You can either edit this file manually or use a GUI utility such as {{citelink|url=http://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/SWAT.html|txt=SWAT}}. This section will demonstrate both methods.
  
'''Edit smb.conf Manually'''
+
==== Edit smb.conf Manually ====
  
 
To modify the file manually, become the superuser and copy the sample file to the configuration directory:
 
To modify the file manually, become the superuser and copy the sample file to the configuration directory:
  
  '''cp /usr/local/share/examples/samba34/smb.conf.sample /usr/local/etc/smb.conf'''
+
  '''cp /usr/local/share/examples/samba36/smb.conf.sample /usr/local/etc/smb.conf'''
  
 
Open the copied file in your favorite editor and review the default settings, editing them to match your network. In particular, check these global settings:
 
Open the copied file in your favorite editor and review the default settings, editing them to match your network. In particular, check these global settings:
Line 222: Line 227:
 
* '''workgroup =''' must match the Windows workgroup or domain name; unless the administrator has changed it, the default workgroup name is WORKGROUP
 
* '''workgroup =''' must match the Windows workgroup or domain name; unless the administrator has changed it, the default workgroup name is WORKGROUP
  
* '''security =''' the security modes are described [http://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/ServerType.html#id2559114 here]
+
* '''security =''' the security modes are described in the {{citelink|url=http://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/ServerType.html#id2559114|txt=Samba HOWTO}}
  
 
* '''hosts allow =''' you should input the network address to restrict connections to the local network
 
* '''hosts allow =''' you should input the network address to restrict connections to the local network
Line 239: Line 244:
 
and try browsing to the share from another system. Note that you may have to first map a drive to the share in order for it to appear in Windows Explorer or within the file manager utility of another PC-BSD or Linux system.
 
and try browsing to the share from another system. Note that you may have to first map a drive to the share in order for it to appear in Windows Explorer or within the file manager utility of another PC-BSD or Linux system.
  
'''Create Shares Using SWAT'''
+
==== Create Shares Using SWAT ====
  
SWAT provides a graphical front-end to smb.conf through a web browser.
+
SWAT provides a graphical front-end to ''smb.conf'' through a web browser.
  
 
To enable SWAT, remove the # at the beginning of this line in ''/etc/inetd<nowiki>.</nowiki>conf'':
 
To enable SWAT, remove the # at the beginning of this line in ''/etc/inetd<nowiki>.</nowiki>conf'':
  
  #swat  stream  tcp    nowait/400    root    /usr/local/sbin/swat    swat  
+
  #swat  stream  tcp    nowait/400    root    /usr/local/sbin/swat    swat
  
 
Add the following line to ''/etc/rc.conf'':
 
Add the following line to ''/etc/rc.conf'':
Line 255: Line 260:
 
  '''/etc/rc.d/inetd start'''
 
  '''/etc/rc.d/inetd start'''
  
To connect to SWAT, open a web browser and input the IP address of the PC-BSD computer followed by :901. When prompted, input the username ''root'' and the password associated with the superuser account. In the example shown in Figure 8.6a, the user has clicked on the Globals button in order to view the global settings.
+
To connect to SWAT, open a web browser and input the IP address of the PC-BSD computer followed by '':901''. When prompted, input the username ''root'' and the password associated with the superuser account. In the example shown in Figure 9.3a, the user has clicked on the "Globals" button in order to view the global settings.
  
'''Figure 8.6a: SWAT Graphical Menu'''
+
'''Figure 9.3a: SWAT Graphical Menu'''
  
 
[[File:Swat.jpeg]]
 
[[File:Swat.jpeg]]
  
One of the nice features of SWAT is the built-in help system. If you need more information about an option, simply click its Help hyperlink to access that section of the Samba documentation. The shares button allows you to quickly create shares and the view button allows you to review the current configuration.
+
One of the nice features of SWAT is the built-in help system. If you need more information about an option, simply click its "Help" hyperlink to access that section of the Samba documentation. The "shares" button allows you to quickly create shares and the "view" button allows you to review the current configuration.
 +
 
 +
<noinclude>{{refheading}}</noinclude>
 
<noinclude>
 
<noinclude>
 
[[category:handbook]]
 
[[category:handbook]]

Revision as of 10:26, 6 November 2012

(Sorry for the inconvenience)

Contents

This section describes the various file managers that are available for managing the files on your PC-BSD system. It then shows how you can configure your PC-BSD system to share files with other systems in your network using Samba.

File Managers and File Structure

Depending upon which window managers you have installed, different graphical file manager utilities may already be installed for you. You do not need to be logged into a specific window manager to use an installed file manager. For example, if KDE is installed, you can run its file manager from any window manager by typing dolphin. KDE, GNOME, LXDE, and XFCE install their own file managers while most of the unsupported desktops assume that you will install your favorite file manager. Table 9.3a summarizes the available file managers and indicates which desktop they are installed with. Some file managers can be installed independent of a desktop using AppCafe® to install the PBI. Once a file manager is installed, type its name if you wish to run it from another desktop.

Table 9.3a: Available File Managers

File Manager Desktop/PBI Screenshots Notes
dolphin


KDE


http://dolphin.kde.org/features.html[1]


emelfm2


PBI


http://emelfm2.net/wiki/ScreenShots[2]


/usr/local/GNUstep/Apps/FSViewer.app/FSViewer


Window Maker


http://www.bayernline.de/~gscholz/linux/fsviewer/[3]


krusader


PBI


http://www.krusader.org/screenshots.php[4]


mucommander


PBI


http://www.mucommander.com/screenshots.php[5]


nautilus


GNOME


http://live.gnome.org/Nautilus/Screenshots[6]


pcmanfm


LXDE or PBI


http://lxde.org/easy_fast_file_management_pcmanfm[7]


thunar


XFCE or PBI


http://www.xfce.org/projects/thunar[8]


unable to automount internal NTFS disks (try pcmanfm or emelfm2 instead)
xfe


PBI


http://roland65.free.fr/xfe/index.php?page=screenshots[9]


When working with files on your PC-BSD system, save your own files to your home directory. Since most of the files outside of your home directory are used by the operating system and applications, you should not delete or modify any files outside of your home directory, unless you know what you are doing.

Table 9.3b summarizes the directory structure found on a PC-BSD system. man hier explains this directory structure in more detail.

Table 9.3b: PC-BSD Directory Structure

Directory Contents
/ pronounced as "root" and represents the beginning of the directory structure
/bin/ applications (binaries) that were installed with the operating system
/boot/ stores the startup code, including kernel modules (such as hardware drivers)
/compat/linux/ Linux software compatibility files
/dev/ files which are used by the operating system to access devices
/etc/ operating system configuration files
/etc/X11/ the xorg.conf configuration file
/etc/rc.d/ operating system startup scripts
/home/ subdirectories for each user account; each user should store their files in their own home directory
/lib/ operating system libraries needed for applications
/libexec/ operating system libraries and binaries
/media/ mount point for storage media such as DVDs and USB drives
/mnt/ another mount point
/proc/ the proc filesystem required by some Linux applications
/rescue/ necesary programs for emergency recovery
/root/ administrative account's home directory
/sbin/ operating system applications; typically only the superuser can run these applications
/tmp/ temporary file storage; files stored here may disappear when the system reboots
/usr/bin/ contains most of the command line programs available to users
/usr/local/ contains the binaries, libraries, startup scripts, documentation, and configuration files used by applications installed from ports or packages
/usr/pbi/ contains the binaries, libraries, startup scripts, documentation, and configuration files used by installed PBIs
/usr/local/share/fonts/ system wide fonts for graphical applications
/usr/local/share/icons/ system wide icons
/usr/ports/ location of system ports tree (if installed)
/usr/share/ system documentation and man pages
/usr/sbin/ command line programs for the superuser
/usr/src/ location of system source code (if installed)
/var/ files that change (vary), such as log files and print jobs

Samba

Samba[10] allows any operating system to share volumes using Microsoft's CIFS protocol. There are two components to Samba:

  • client libraries: this allows an operating system to access existing CIFS shares. The client is built into the Windows and Mac OS X operating systems and is installed for you during the PC-BSD installation. Most Linux distros also install the Samba client; if your Linux distro does not, search its software repository.
  • server: this allows a computer to act like a Windows server in that it can create shares and printers that are available to any CIFS client on the same network.

This section will demonstrate how to access shares using the Samba client as well as how to configure your PC-BSD system as a Samba server.

Using the Samba Client

Since the Samba client libraries are pre-installed for you, you simply have to decide which utility you prefer to access existing Windows shares on your network. If a desktop is installed, you do not have to be logged into that desktop in order to use that utility.

Table 9.3c summarizes the available utilities (type a utility's name to launch it in any desktop), which desktop it installs with and whether or not a separate PBI is available, and a short description of how to access the available shares using that utility.

Table 9.3c: Utilities that Support Windows Shares

Utility Desktop/PBI How to Access Existing Shares
dolphin KDE in the left frame, click on NetworkSamba Shares, then the Workgroup name; if the network requires a username and password to browse for shares, set this in Control PanelSystem SettingsSharing while in KDE or type systemsettingsSharing while in another desktop
konqueror KDE in the location bar, type smb:/
krusader PBI add Local Network to toolbar by going to SettingsConfigure Toolbars; once in toolbar click Local NetworkSamba Shares
mucommander PBI click on GoConnect to serverSMB; input the NETBIOS name of server, name of share, name of domain (or workgroup), and the share's username and password
nautilus GNOME click on GoNetworkWindows Network
smb4k PBI click on the "Network Neighborhood" tab
thunar XFCE or PBI in the left frame, click on NetworkWindows Network'

Configuring the Samba Server

If you would like to share folders or a printer attached to your PC-BSD system with other users in your network, configure the built-in Samba server.

In order to create shares, Samba's configuration file, smb.conf[11], needs to be modified. You can either edit this file manually or use a GUI utility such as SWAT[12]. This section will demonstrate both methods.

Edit smb.conf Manually

To modify the file manually, become the superuser and copy the sample file to the configuration directory:

cp /usr/local/share/examples/samba36/smb.conf.sample /usr/local/etc/smb.conf

Open the copied file in your favorite editor and review the default settings, editing them to match your network. In particular, check these global settings:

  • workgroup = must match the Windows workgroup or domain name; unless the administrator has changed it, the default workgroup name is WORKGROUP
  • hosts allow = you should input the network address to restrict connections to the local network

In the share definitions section, review the [homes] settings. You can also define your own shares. This example will share the Downloads directory of user1 as read-only:

[Downloads]
path = /usr/home/user1/Downloads
public = yes
writable = no

To test your changes, restart the Samba service:

/usr/local/etc/rc.d/samba restart

and try browsing to the share from another system. Note that you may have to first map a drive to the share in order for it to appear in Windows Explorer or within the file manager utility of another PC-BSD or Linux system.

Create Shares Using SWAT

SWAT provides a graphical front-end to smb.conf through a web browser.

To enable SWAT, remove the # at the beginning of this line in /etc/inetd.conf:

#swat   stream  tcp     nowait/400    root    /usr/local/sbin/swat    swat

Add the following line to /etc/rc.conf:

inetd_enable=”YES”

And start inetd:

/etc/rc.d/inetd start

To connect to SWAT, open a web browser and input the IP address of the PC-BSD computer followed by :901. When prompted, input the username root and the password associated with the superuser account. In the example shown in Figure 9.3a, the user has clicked on the "Globals" button in order to view the global settings.

Figure 9.3a: SWAT Graphical Menu

Swat.jpeg

One of the nice features of SWAT is the built-in help system. If you need more information about an option, simply click its "Help" hyperlink to access that section of the Samba documentation. The "shares" button allows you to quickly create shares and the "view" button allows you to review the current configuration.


  1. http://dolphin.kde.org/features.html
  2. http://emelfm2.net/wiki/ScreenShots
  3. http://www.bayernline.de/~gscholz/linux/fsviewer/
  4. http://www.krusader.org/screenshots.php
  5. http://www.mucommander.com/screenshots.php
  6. http://live.gnome.org/Nautilus/Screenshots
  7. http://lxde.org/easy_fast_file_management_pcmanfm
  8. http://www.xfce.org/projects/thunar
  9. http://roland65.free.fr/xfe/index.php?page=screenshots
  10. http://samba.org/
  11. http://samba.org/samba/docs/man/manpages-3/smb.conf.5.html
  12. http://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/SWAT.html
  13. http://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/ServerType.html#id2559114
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox