Dear Kris --<br><br>
Ticket #6 (Fix KDE samba/NFS sharing) @ <a href="http://trac.pcbsd.org/ticket/6">http://trac.pcbsd.org/ticket/6</a> has been around for 16 months and is now earmarked for the 7.1 release. Could you please pass on my information to Florian for whatever help it will offer. My information concerns configuring PCBSD to enable NFS and Samba sharing. <br>
<br>Most of this is not new, and it will not "fix KDE"(if it is a KDE problem), but it will provide critical information that allows both SD/NFS clients and Windows clients to pass through the PCBSD pf firewall and see the shared directories. <br>
<br>Most of these changes to the configuration files could be installed with a script or incorporated into the "server" installation routine.<br><br>I hope this helps.<br><br>Ian Robinson<br>Salem, Ohio<br><br>Advice on configuring PCBSD as a network file server with NFS and Samba for BSD and Windows access.<br>
<br>There are several Server Configuration files that must be modified to operate an NFS Server with Samba access. Most of this information is readily available on the web. The thing that is critical to making it work with PCBSD is to modify /etc/pf.conf to let NFS and Windows clients pass through the pf firewall. This is the list of files to modify:<br>
<br>1. /etc/exports (1 line)<br>2. /etc/pf.conf (3 lines)<br>3. /etc/rc.conf (3 lines)<br>4. /etc/hosts.allow (optional)<br>5. /usr/local/etc/smb.conf (many lines)<br><br>Part 1. ==================== Modify /etc/exports (SERVER) ===================<br>
<br># identify the directory to export, the local network address, & net mask <br># /usr/home/IR -network 192.168.2.0 -mask 255.255.255.0<br><br><br>Part 2. ==================== Modify /etc/pf.conf (SERVER) ===================<br>
<br># at the top of the file, define a macro variable to identify the local network <br>#<br>lan = "<a href="http://192.168.1.0/24">192.168.1.0/24</a>"<br><br># at the end of the file, add lines to pass all traffic to/from local network<br>
# notice the local network is identified here as the macro variable $lan<br># here, xl0 is the network interface card (NIC)<br>#<br>pass in on xl0 from $lan to any keep state<br>pass out on xl0 from any to $lan keep state<br>
<br>Part 3. ==================== Modify /etc/rc.conf (SERVER) ===================<br><br># add the next three lines to make the computer an nfs file server<br># see further below to configure an nfs client<br>#<br>rpcbind_enable="yes"<br>
nfs_server_enable="yes"<br>mountd_flags="-r"<br>#nfs_reserved_port_only="yes"<br>#nfs_server_flags="-u -t -n 8"<br><br><br>Part 4. ==================== Optional Modifications to /etc/hosts.allow (SERVER) ===============<br>
<br># No changes are necessary, but you could change anyplace<br># the file references an ip address or netmask<br># to match your particular network<br><br><br>Part 5. =================== Modify /usr/local/etc/smb.conf (Server) ======================<br>
<br>[global]<br><br># workgroup = NT-Domain-Name or Workgroup-Name, eg: MIDEARTH<br> workgroup = MYGROUP <------------------------------------ (change to your Windows workgroup)<br><br># server string is the equivalent of the NT Description field<br>
server string = Samba Server <---------------------------(change to meet your naming needs)<br><br># Security mode. Defines in which mode Samba will operate. Possible <br># values are share, user, server, domain and ads. Most people will want <br>
# user level security. See the Samba-HOWTO-Collection for details.<br> security = user <------------------------------------ (change to security = share )<br><br># This option is important for security. It allows you to restrict<br>
# connections to machines which are on your local network. The<br># following example restricts access to two C class networks and<br># the "loopback" interface. For more examples of the syntax see<br># the smb.conf man page<br>
; hosts allow = 192.168.1. 192.168.2. 127. <-----------(change to match the 1st three parts of your network tcp address, keep 127. )<br><br> * * *<br><br>[homes] <br><br> comment = Home Directories<br>
browseable = no<br> writable = yes<br><br> * * *<br><br>[printers]<br>comment = All Printers<br>path = /usr/spool/samba<br>browseable = no<br># Set public = yes to allow user 'guest account' to print<br>
guest ok = no<br>printable = yes<br>#<br># >>> Custom Additions to Locate Files and Permit Access <<<==============================<br>#<br>[FK_SERVER] <------------------- Section Label, here w/ my server's name<br>
comment = general user documents and files<br> path = /fk_server <------------------ Mount Path to server files<br> public = yes<br> read only = no<br> writeable = yes<br> browseable = yes<br>
guest ok = yes<br> available = yes<br> guest account = nobody<br> force group = nogroup<br> force user = nobody<br> create mask = 0777<br> directory mask = 0777<br> nt acl support = No<br>#<br># End Samba Changes<br>
<br><br><br>To access the NFS Server with a PCBSD CLIENT, you must modify one configuration file ( /etc/rc.conf ) and create a mount point on the client directory tree:<br><br># Add this line to /etc/rc.conf<br># nfsiod -n 4<br>
<br>Make Mount Point on Client Directory Tree<br><br>#mkdir /mnt/server<br><br>Now everything should be ready to actually mount a remote file system. In these examples the server's name will be "server" and the client's name will be "client."<br>
<br>Execute a command like this as root on the client (Syntax: # mount_nfs <server_IP>:<server_dir_path> /<mount_point>)<br><br># mount_nfs 192.168.2.100:/home/IR /mnt/server<br><br><br>On the Windows client, you step through "My Network Places" until you see the PCBSD share. It helps to go into "My Computer" or "Windows Explorer" to "Map a Network Drive" to a drive letter.<br>
<br><br><br><br>