Mount a Windows shared folder using Samba

To list shares on [server] visible to [username] use the following. You will be prompted for a password.

smbclient -L \\[server] -U [username]

To mount the //server/dir share on /mnt/dir, giving [username] and [password] as authentication:

smbmount //server/dir /mnt/dir -o username=[username],password=[password]

Alternatively, the same can be achieved using mount as a wrapper command:

mount -t smbfs //server/dir /mnt/dir -o username=[username],password=[password]

You can add the following to /etc/fstab so that you can mount the share with the command mount /mnt/share. This often means that the share will be mounted on boot by the /etc/rc.d/init.d/netfs script.

//server/share   /mnt/share   smbfs   username=username,password=password 0 0

Last modified: 17/04/2006 (most likely earlier as a site migration in 2006 reset some dates) Tags: (none)

This website is a personal resource. Nothing here is guaranteed correct or complete, so use at your own risk and try not to delete the Internet. -Stephan

Site Info

Privacy policy

Go to top