Thursday, 11 June 2009

How to mount Windows (SMB/CIFS) shares in Linux (Ubuntu)

1. Install smbfs package
sudo aptitude install smbfs

2. Create the directory where you will mount the share
mkdir /mnt/share

3. Create a file to store the credentials...
nano /etc/cifspw
...and enter the username/password
username=enter_username
password=enter_password

4. Edit fstab to mount the share at startup
sudo nano /etc/fstab

//server/share /mnt/share/ cifs credentials=/etc/cifspw,domain=DOMAIN 0 0

5. Mount the share
sudo mount -a

No comments: