I'm using Ubuntu 11.10, and am trying to mount a freenas server. I have the server set to share in cifs and nfs with no luck.
I have tried smbmount //192.168.1.### /mnt/
I am not new to Ubuntu but am nowhere near a power user, so I'd prefer a GUI option if available.
How do I mount a cifs share in 11.10?
There is pyNeighborhood which is a gui for mounting samba shares and available in the software centre for download.
There is a good article located here on how to set it up and use it.
First install cifs utils
Alternatively, the basic terminal command is :
If you'd like to see your mount in Nautilus it would be good to create a subfolder first in /media/USERNAME/ for example:
also, password could ommited in the mount command for example (will also demonstrate file/folder modes):
in this case you'll be asked for the password (actually for 2 passwords) on the mounting moment.
Have a read through the Samba documentation here on how to do it and set it up correctly to mount on start up etc.
It's as map7 said, but if you don't want to use root permissions every time you change a file on the drive, then you'll have to mount to a user folder, and make sure the gid and uid are set to your username.
The command setting them:
Note that
mnt
folder was created in~/mnt/share
instead of/mnt/share
.Also you can leave out password=PASSWD if you want it to prompt you instead of you having it in the command, which is potentially stored in your shell's history:
1) My samba share shows in Caja (the ubuntu 16.04 „explorer“) as
This is a good lithmus test, there are no connection/path issues.
(caveat: If you get asked by caja about password credentials from your windows machine, you might want to switch Domain from WORKGROUP to the name of the machine, i.e. ‘thinkpad’. Then the truly local login credentials of your drive should do.)
2) If that works, here comes the command:
,password=supersecret
directly (no space) after username=, but you can also wait for being prompted, when you enter the command.I disagree with the claim that root is always necessary to make cifs connections go. It is true, it is always needed for CLI smbmount, but a file manager such as nautilus has ability to mount a cifs share and it is not necessary to be root.
I don't use Gnome, but I still have Nautilus installed. Run this in a terminal to prevent having it try to take over the desktop
In Ubuntu 16.04, left side tree menu has "Connect to Server" on the bottom. Click that, the suggestion is type "smb://foo.example.com". smb is old word for "cifs", and if you put in your server and share with smb:// at beginning, connection does work! I promise. If your share is a named thing, it is required after a slash, "smb://foo.example.com/myshare".
I've used other file managers in same way. Protocol has to be "smb://".
You can put all those details in /etc/fstab so you can have directories mounted on system startup. If windows or SMB server is on IP address 192.168.1.1
Create directory as linux mount point
For the first time mount this manually
Eventual errors can be found by
There is specific issue possible and very frustrating to resolve when versions of CIF/SMB are not compatible between Linux and Windows. In that case you can just make minor chnage in fstab line adding "vers=2.1"
So, if Windows or SMB server is on IP address 192.168.1.1
Steps 2, 3 and 4 remains the same as in previous answer.
I put together a little script (it's meant for Fedora though) to mount the CIFS filesystem from the command line and create/delete a test file. May be of some use:
how the different mounting methods work has been exhausted, but there's something you might want to consider
if you don't want to enter your credentials directly into /etc/fstab you can use a mount option instead: credentials=/your/path/here/.credentials
this should contain username=msusername password=mspassword
Save the file and exit your choice editor.
permissions should be changed to chmod 600
if you have an encrypted home directory and want your mount to be up on boot make sure to place the file outside your home directory. in /etc/ or /media/ might be a suitable and easily memorable place.