I’m going to be working with a home network with five machines. Their URLs are:
gw my desktop Linux 12.10 dell old laptop Linux 12.10 sony new laptop Linux 12.10 becky desktop Linux 12.10 photo desktop Windows 7I use
NFS connections for Linux-to-Linux, but
interconnecting with Windows requires interfacing with the Windows
Workgroup facility formerly called SMB and now called (at
least by Microsoft) CIFS. The Linux (or OS-X) tool for
this is called Samba.
samba is not installed by default, so
install the following packages:
sudo apt-get install samba smbclient cifs-utils samba-doc xinetd
xinitd isn’t really part of this, but you should
install it anyway. Trust me. Note that if you are only
trying to mount a Win share on Linux and not vice versa, all
you need is cifs-utils.
On WIN7:
On Ubuntu, edit /etc/samba/smb.conf. In the
[global] section, create or modify the line
workgroup = MYWKGP
or whatever.
On WIN7, display the chosen directory in Windows Explorer. Click on Share With and choose Homegroup(Read/Write).
On Ubuntu,
/etc/samba/smb.conf to create a
section in the following form for each directory structure you
want to share:
[home]
comment = john home directory
path = /home/dierdorf
writable = YES
guest ok = YES
browsable = YES
...to create a share called home to allow WIN to access
the given directory.
sudo /etc/init.d/smbd restart
or, if you installed xinetd like I said,
sudo service samba restart
/win.
C:\users\dierdorf, which
exists on machine photo, at mount point /win
on Linux, with full read/write privileges:
sudo mount -t cifs photo:/users/dierdorf /win
-o file_mode=0644,dir_mode=0777,user=dierdorf,
uid=dierdorf,gid=dierdorf
Note the Linux-style forward slashes. (That’s all one long
line. I put it in a batch file, but it would also be possible to set
it up in /etc/fstab.)