Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

What is a simple way to (temporarily) mount a windows share from within Ubuntu 11.04 via the command line?

Basically, I'd like the path /home/myuser/windowsbox to map to a windows share. (Need to supply user/pass/domain)

Most of the tutorials I can find use fstab for a permanent mapping. The GUI options do not let me specify a local path for the mounting.

Thank you

share|improve this question

2 Answers 2

up vote 4 down vote accepted

Just use mount -t cifs to do it from command line. Consult manpage for mount to learn about additional options like user/password/explicit filename encoding/file ownership etc. You would unmount it using umount /home/myuser/windowsbox

In particular see the uid/gid options. This will let normal users access the share.

There's also smbfs as mount type but please don't use it since it's being obsoleted by cifs.

share|improve this answer
4  
+1 for the obsoletion reminder on smbfs. –  Tim Brigham Oct 5 '11 at 15:38

Open a command line and enter the following.

smbmount //MYWINBOX/MYSHARE /mnt/winstuff -o username=domain//username 

From here you should be able to enter your password and mount your volume.

share|improve this answer
    
On my machine I get the error: mount.cifs: permission denied: no match for /home/myuser/windowsbox found in /etc/fstab –  nonot1 Oct 5 '11 at 22:11

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.