Up

Accessing Samba shares from the command line

These instructions are for use with Ubuntu.

First you need the smbmount, smbmnt, and smbumount command.

sudo apt-get install smbfs.

Then you want to setup the smbmnt and smbumount command as suid root:

sudo chmod +s /usr/bin/smbmnt
sudo chmod +s /usr/bin/smbumount

Create a mount-point for your SMB share.

sudo chmod /mnt/MOUNTPOINT
sudo chown USER /mnt/MOUNTPOINT

Note: Replace MOUNTPOINT with the name you want and USER with your user name.

Mount the SMB share:

smbmount //IP_ADDRESS/SHARE /mnt/MOUNTPOINT -o username=USERNAME,password=PASSWORD

Note: Replace IP_ADDRESS with the IP address (or name) of the SMB server machine. Replace SHARE with the name of the SMB share. Replace USERNAME with the account of an SMB user that has permission to mount the share. Replace PASSWORD with the password of the SMB user that has permission to mount the share. If you omit the password it will prompt you to enter it.

Unmounting the SMB share:

smbumount /dev/MOUNTPOINT


Page last modified on March 25, 2007, at 11:13 AM