Friday, July 1, 2011

Samba file share with a Windows Server

You may need to install smbfs:
sudo apt-get install smbfs 
 
I assume samba is already installed, if not:
sudo apt-get install samba 
 
 
Create directory to mount 
$mkdir -p /mnt/win
Mount windows server to the newly created directory
$mount -t smbfs -o username=winntuser,password=mypassword //windowsserver/sharename /mnt/win
(Source
 
 
Next create the password file /etc/sambapasswords:

cat > /etc/sambapasswords
username = winntuser
password = mypassword

make sure that only root have access to it

chown root:root /etc/sambapasswords
chmod 600 /etc/sambapasswords
 
 
Add an entry to your /etc/fstab: 
//windowserver/share /mnt/win smbfs
auto,gid=users,fmask=0664,dmask=0775,iocharset=iso8859-15, credentials=/etc/sambapasswords 0 0
 

0 comments:

Post a Comment