Temporarily mount Windows share via cmd line? (Ubuntu 11.04)
Solution 1
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
.
Solution 2
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.
Solution 3
What is the name of your Windows share that you're trying to map? This is how I've done temporary mapping (substitute //mywinbox/myshare
with the network path to the widows share you want to map and with the username credentials to connect to your Windows box):
sudo mount -t cifs //mywinbox/myshare /home/myuser/windowsbox -o username=<username>
It would probably be recommended that you house your mappings in a more established location such as /mnt/windowsbox
then perhaps create a symlink in the /home/myuser
directory. Just a thought for consistency.
Related videos on Youtube
nonot1
Updated on September 18, 2022Comments
-
nonot1 over 1 year
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
-
nonot1 over 12 yearsOn my machine I get the error:
mount.cifs: permission denied: no match for /home/myuser/windowsbox found in /etc/fstab