I’ve got an old Dell laptop, which runs Arch, an Imac 20 inch and a LG DP1W mediaplayer and streamer. Now would it not be great if I could share file across all three machines? I’m gonna start with SAMBA and see how well this works. NFS will come later…
Ok, here we go.
Step 1. First thing to do is install the Samba client and server software on Arch.
# sudo pacman -S smbclient samba gamin
Gamin is a file and directory monitoring system defined to be a subset of the FAM (File Alteration Monitor) system. It is a service provided by a library which allows for the detection of modification to a file or directory. Gamin re-implements the FAM specification with inotify. It is newer and more actively maintained than FAM, maintains compatibility with FAM and can replace it in almost every case. It is a GNOME project, but does not have GNOME dependencies.
Step 2. Configure samba. As root, copy the default Samba configuration file to /etc/samba/smb.conf:
# cp /etc/samba/smb.conf.default /etc/samba/smb.conf
Then configure this file to your needs. By default the HOME user directories are shared.
Step 3. Add a user. To log into a Samba share you’ll need to add a user:
# smbpasswd -a <user>
Note that the user you add should be an existing user on the server side of Samba.
Step 4. Make Samba load at boot. Add the following to /etc/rc.conf to access the shares at boot:
# sudo nano /etc/rc.conf
Find the section that looks like and add smbnetfs and samba:
DAEMONS=(... smbnetfs samba )
That’s it! You should now be able to access your home folder from a another machine.
Good luck!