Dancing the SAMBA: An Introduction to Living with Windows

Mounting remote shares with smbmount

The most general way to access a remote file share is to mount it as a local file system. Samba provides a tool called smbmount to allow a user to mount a remote share without becoming root. Note that this is a security risk, as the smbfs driver is quite unstable and can lead to a system hang.

To mount a remote share, you must first create the mount point, and then run smbmount to mount it. To unmount, use smbumount. The mounted share is accessible as a local file system.

(12:38) altman /home/alon> mkdir mnt
(12:38) altman /home/alon> smbmount //tomer/c$ mnt/
added interface ip=192.168.1.1 bcast=192.168.1.255 nmask=255.255.255.0
Got a positive name query response from 127.0.0.1 ( 192.168.1.3 )
Password:
(12:38) altman /home/alon> cd mnt/
(12:38) altman /home/alon/mnt> ls
... [ Directory listing snipped ] ...
(12:38) altman /home/alon/mnt> cd ..
(12:38) altman /home/alon> smbumount mnt/
(12:38) altman /home/alon> ls mnt/
(12:39) altman /home/alon>

To disable smbmount in multi-user systems do (as root):

# chmod a-s /usr/bin/smbmnt
Valid HTML 4.01!Alon Altman