Tuesday, August 31, 2010

Mounting Samba drive in Linux

Samba allows file and print sharing between computers running Windows and computers running Unix.
Samba sets up network shares for chosen Unix directories (including all contained subdirectories). These appear to Microsoft Windows users as normal Windows folders accessible via the network. Unix users can either mount the shares directly as part of their file structure using the smbmount command OR can use a command line utility, smbclient (libsmb) installed with Samba to read the shares.

Fedora/RH linux
  uses Common Internet File System (CIFS)
yum search cifs
yum install cifs-utils.i686 samba4.i686
sudo mount.cifs // /mnt/win-dir -o username=myuser

  uses smbfs
sudo apt-get install smbfs
sudo mount -t smbfs // /mnt/win-dir -o username=myuser

  Another utility is smbmount
sudo smbmount // /mnt/win-dir -o username=myuser

No comments:

Post a Comment