[opensuse] connecting to samba folders on a network
I recently took up a position volunteering at an international school 3 times a week. All the staff here are volunteers, and as a result, we often have some holes in our knowledge. Since I began using openSUSE 5 years ago (my first and only Linux distribution that I experimented with) I have learned quite a bit, but some things were never necessary to learn. For example, Samba shares. I was not setting up an internal server in my house, so I didn't have any need to explore how to set up shared folders and drives. At the school where I volunteer, I work in the engineering department, not the IT department. So even though I am just a user of the network and not a sysadmin, I asked if my workstation could be openSUSE instead of windows, and they agreed, no problem, as long as I can for the most part work out all my own technical problems, since they mostly only know windows. The system here is like this. A few years ago we had someone come through in the IT department that set up the school's network on a linux server, CentOS, and set up samba folders for sharing on the network. It still runs, and those are all the shared drives on the network. As part of the engineering department, I need to access these shared drives and read the files, in particular the drawing files. When I set up my pc as a client for reading samba shares (I allowed samba services for both a server and a client in the firewall), I went into yast -> windows domain membership, and then set up the domain. Then I went to dolphin, clicked on the network icon, and searched through the samba shared folders. We found some of the network folders that came up, but not all. I had an IT guy come here and we were able to manually navigate to the network folder I need, which has the format of: smb://administrator username@servername/path With that format, I am able to access the folders, but only in dolphin and only by manually entering the long navigation path. I tried to set up a network drive with the network folder wizard in dolphin, but it is very difficult to figure out what goes in what field, and which part of the wizard to use. Do I connect via FTP? I read somewhere that samba clients on linux machines can connect to samba folders via ftp. Do I connect instead as if the samba folders are emulating a Microsoft Windows Network drive? In that one, it has fields for entering name, server, and folder. In the FTP, it has fields for entering name, user, server, port, and folder. I tried both, with various combinations of username, server name, path, etc. in the appropriate fields, and it is never able to create a network folder. However, I can still access the network folder in dolphin if I manually enter the folder string, as I noted above. BTW, I am using Leap 42.2 and KDE. George -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
george from the tribe wrote:
We found some of the network folders that came up, but not all. I had an IT guy come here and we were able to manually navigate to the network folder I need, which has the format of:
smb://administrator username@servername/path
With that format, I am able to access the folders, but only in dolphin and only by manually entering the long navigation path. I tried to set up a network drive with the network folder wizard in dolphin, but it is very difficult to figure out what goes in what field, and which part of the wizard to use. Do I connect via FTP? I read somewhere that samba clients on linux machines can connect to samba folders via ftp.
George, you could just mount it - add it to your fstab for instance: //yourserver/yourdir /where/to/mount cifs user=user,password=passwd 0 0 -- Per Jessen, Zürich (-3.9°C) http://www.dns24.ch/ - your free DNS host, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Wednesday, 18 January 2017 09:53:45 CET Per Jessen wrote:
george from the tribe wrote:
We found some of the network folders that came up, but not all. I had an IT guy come here and we were able to manually navigate to the network folder I need, which has the format of:
smb://administrator username@servername/path
With that format, I am able to access the folders, but only in dolphin and only by manually entering the long navigation path. I tried to set up a network drive with the network folder wizard in dolphin, but it is very difficult to figure out what goes in what field, and which part of the wizard to use. Do I connect via FTP? I read somewhere that samba clients on linux machines can connect to samba folders via ftp.
George, you could just mount it - add it to your fstab for instance:
//yourserver/yourdir /where/to/mount cifs user=user,password=passwd 0 0
lots of other tips and tricks here: https://wiki.archlinux.org/index.php/samba -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 01/18/2017 04:53 PM, Per Jessen wrote:
george from the tribe wrote:
We found some of the network folders that came up, but not all. I had an IT guy come here and we were able to manually navigate to the network folder I need, which has the format of:
smb://administrator username@servername/path
With that format, I am able to access the folders, but only in dolphin and only by manually entering the long navigation path. I tried to set up a network drive with the network folder wizard in dolphin, but it is very difficult to figure out what goes in what field, and which part of the wizard to use. Do I connect via FTP? I read somewhere that samba clients on linux machines can connect to samba folders via ftp.
George, you could just mount it - add it to your fstab for instance:
//yourserver/yourdir /where/to/mount cifs user=user,password=passwd 0 0
Ok, great, I will try that. Thanks! -- George Box: 42.2 | KDE Plasma 5.8 | AMD Phenom IIX4 | 64 | 32GB Laptop #1: 42.2 | KDE Plasma 5.8 | Core i7-4710HQ | 64 | 16GB Laptop #2: 42.2 | KDE Plasma 5.8 | Core i5 | 64 | 8GB -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 01/19/2017 08:16 AM, George from the tribe wrote:
On 01/18/2017 04:53 PM, Per Jessen wrote:
//yourserver/yourdir /where/to/mount cifs user=user,password=passwd 0 0
Ok, great, I will try that. Thanks!
So, here is what happens. I am able to connect in dolphin, with the path entered in the file navigation line at the top of dolphin. At first there was a problem with my network access, but that is fixed now. However, I still need to mount this network drive in fstab, and it isn't working. I tried cifs and nfs, and I am never able to mount the drive. I tried 6 different formats for the line in fstab to mount the network drive, using either cifs or nfs, and here they are (with my password x'd out): 1 - //faith%5Cgeorge.olson@vstorage1:/Faculty-Staff%20Data/fsCampusDevFacilities$/Drawings/ /mounters/faithnetmnt/ cifs _netdev,rw,user=george.olson,password=xxxxxx 0 0 2 - //faith%5Cgeorge.olson@vstorage1:/Faculty-Staff%20Data/fsCampusDevFacilities$/Drawings/ /mounters/faithnetmnt/ nfs _netdev,rw,user=george.olson,password=xxxxxx 0 0 3 - smb://faith%5Cgeorge.olson@vstorage1:/Faculty-Staff%20Data/fsCampusDevFacilities$/Drawings/ /mounters/faithnetmnt/ cifs _netdev,rw,user=george.olson,password=xxxxxx 0 0 4 - smb://faith%5Cgeorge.olson@vstorage1:/Faculty-Staff%20Data/fsCampusDevFacilities$/Drawings/ /mounters/faithnetmnt/ nfs _netdev,rw,user=george.olson,password=xxxxxx 0 0 5 - vstorage1:/Faculty-Staff%20Data/fsCampusDevFacilities$/Drawings /mounters/faithnetmnt cifs auto 0 0 6 - vstorage1:/Faculty-Staff%20Data/fsCampusDevFacilities$/Drawings /mounters/faithnetmnt nfs auto 0 0 So, running # mount -a -v on each one, here are the results: 1 - # mount -a -v swap : ignored / : ignored /home : already mounted /windows/C : already mounted mount error: could not resolve address for faith%5Cgeorge.olson@vstorage1:: Unknown error 2 - # mount -a -v swap : ignored / : ignored /home : already mounted /windows/C : already mounted mount.nfs: timeout set for Fri Jan 20 11:49:27 2017 mount.nfs: Failed to resolve server //faith%5Cgeorge.olson@vstorage1: Name or service not known 3 - # mount -a -v swap : ignored / : ignored /home : already mounted /windows/C : already mounted Mounting cifs URL not implemented yet. Attempt to mount smb://faith%5Cgeorge.olson@vstorage1:/Faculty-Staff%20Data/fsCampusDevFacilities$/Drawings/ 4 - # mount -a -v swap : ignored / : ignored /home : already mounted /windows/C : already mounted mount.nfs: timeout set for Fri Jan 20 11:51:28 2017 mount.nfs: Failed to resolve server smb: Name or service not known 5 - # mount -a -v swap : ignored / : ignored /home : already mounted /windows/C : already mounted mount.cifs: bad UNC (vstorage1:/Faculty-Staff%20Data/fsCampusDevFacilities$/Drawings) 6 - # mount -a -v swap : ignored / : ignored /home : already mounted /windows/C : already mounted mount.nfs: timeout set for Fri Jan 20 11:52:53 2017 mount.nfs: trying text-based options 'vers=4,addr=10.1.3.35,clientaddr=10.1.33.10' mount.nfs: mount(2): Connection refused mount.nfs: trying text-based options 'addr=10.1.3.35' mount.nfs: prog 100003, trying vers=3, prot=6 mount.nfs: portmap query retrying: RPC: Unable to receive mount.nfs: prog 100003, trying vers=3, prot=17 mount.nfs: portmap query failed: RPC: Unable to receive - Connection refused mount.nfs: trying text-based options 'vers=4,addr=10.1.3.35,clientaddr=10.1.33.10' mount.nfs: mount(2): Connection refused mount.nfs: trying text-based options 'addr=10.1.3.35' mount.nfs: prog 100003, trying vers=3, prot=6 mount.nfs: portmap query retrying: RPC: Unable to receive mount.nfs: prog 100003, trying vers=3, prot=17 mount.nfs: portmap query failed: RPC: Unable to receive - Connection refused mount.nfs: trying text-based options 'vers=4,addr=10.1.3.35,clientaddr=10.1.33.10' mount.nfs: mount(2): Connection refused mount.nfs: trying text-based options 'addr=10.1.3.35' mount.nfs: prog 100003, trying vers=3, prot=6 mount.nfs: portmap query retrying: RPC: Unable to receive mount.nfs: prog 100003, trying vers=3, prot=17 mount.nfs: portmap query failed: RPC: Unable to receive - Connection refused ^C ----------- So you see that none of those formats seem to be getting it right, either with nfs or cifs. Any suggestions? I would really like to be able to mount this drive. I can access it right now without mounting it only using dolphin's file manager, but I need to access it as a mounted drive, and apart from dolphin. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
george from the tribe wrote:
On 01/19/2017 08:16 AM, George from the tribe wrote:
On 01/18/2017 04:53 PM, Per Jessen wrote:
//yourserver/yourdir /where/to/mount cifs user=user,password=passwd 0 0
Ok, great, I will try that. Thanks!
So, here is what happens.
I am able to connect in dolphin, with the path entered in the file navigation line at the top of dolphin. At first there was a problem with my network access, but that is fixed now.
Okay.
However, I still need to mount this network drive in fstab, and it isn't working. I tried cifs and nfs, and I am never able to mount the drive.
Just to make sure - we are still talking about a samba server? If so, bringing up nfs makes no sense.
I tried 6 different formats for the line in fstab to mount the network drive, using either cifs or nfs, and here they are (with my password x'd out):
1 - //faith%5Cgeorge.olson@vstorage1:/Faculty-Staff%20Data/fsCampusDevFacilities$/Drawings/ /mounters/faithnetmnt/ cifs _netdev,rw,user=george.olson,password=xxxxxx 0 0
faith%5Cgeorge.olson@vstorage1 is a hostname? %5C is a backslash. A hostname is made up of sequences (labels) of a-z, 0-9 and '-' (hyphen), joined by '.' (dot). Apart from the ':', the rest looks okay. [snip proposal 2-3-4]
5 - vstorage1:/Faculty-Staff%20Data/fsCampusDevFacilities$/Drawings /mounters/faithnetmnt cifs auto 0 0
The servername needs to be prefixed by '//', the ':' does not belong there and you're missing user and password in options, otherwise it looks good.
So you see that none of those formats seem to be getting it right, either with nfs or cifs. Any suggestions? I would really like to be able to mount this drive. I can access it right now without mounting it only using dolphin's file manager, but I need to access it as a mounted drive, and apart from dolphin.
With dolphin it is still mounted, just behind the scene. Going with what you've posted above, this is what I would suggest for fstab: //vstorage1/Faculty-Staff%20Data/fsCampusDevFacilities$/Drawings /mounters/faithnetmnt/ cifs _netdev,rw,user=george.olson,password=xxxxxx 0 0 (all on one line of course). To test it on the command line: mount -t cifs -o rw,user=george.olson,password=xxxxxx //vstorage1/Faculty-Staff%20Data/fsCampusDevFacilities$/Drawings /mounters/faithnetmnt/ -- Per Jessen, Zürich (-4.9°C) http://www.hostsuisse.com/ - dedicated server rental in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 01/20/2017 03:08 PM, Per Jessen wrote:
With dolphin it is still mounted, just behind the scene.
Going with what you've posted above, this is what I would suggest for fstab:
//vstorage1/Faculty-Staff%20Data/fsCampusDevFacilities$/Drawings /mounters/faithnetmnt/ cifs _netdev,rw,user=george.olson,password=xxxxxx 0 0
(all on one line of course).
To test it on the command line:
mount -t cifs -o rw,user=george.olson,password=xxxxxx //vstorage1/Faculty-Staff%20Data/fsCampusDevFacilities$/Drawings /mounters/faithnetmnt/
Ok, thanks again for your help. Here is what I tried. First from the command line: mount -t cifs -o rw,user=george.olson,password=******** "//vstorage1/Faculty-Staff Data/fsCampusDevFacilities$/Drawings" /mounters/faithnetmnt/ Putting the path in quotes, and allowing the space to be there between Faculty-Staff and Data, instead of %20, allowed the drive to be mounted! So I looked in /etc/mtab, and I saw that this was the line it had in there: //vstorage1/Faculty-Staff\040Data/fsCampusDevFacilities$/Drawings /mounters/faithnetmnt cifs rw,relatime,vers=1.0,cache=strict,username=george.olson,domain=FAITH,uid=0,noforceuid,gid=0,noforcegid,addr=10.1.3.35,file_mode=0755,dir_mode=0755,nounix,serverino,mapposix,rsize=61440,wsize=65536,actimeo=1 0 0 Note that where I had %20, thinking that was the proper ascii hex code for a space, mtab put in \040 in that spot. So I put this line, with \040 in that place into fstab: //vstorage1/Faculty-Staff\040Data/fsCampusDevFacilities$/Drawings /mounters/faithnetmnt/ cifs _netdev,rw,user=george.olson,password=****** 0 0 And here is the result: # mount -a -v swap : ignored / : ignored /home : already mounted /windows/C : already mounted mount.cifs kernel mount options: ip=10.1.3.35,unc=\\vstorage1\Faculty-Staff Data,user=george.olson,prefixpath=fsCampusDevFacilities$/Drawings,pass=******** /mounters/faithnetmnt : successfully mounted It looks like the main culprit was using %20 for a space in the path, instead of where I should have used \040. Great! It finally works! Thanks so much for your help! -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
george from the tribe wrote:
It looks like the main culprit was using %20 for a space in the path, instead of where I should have used \040. Great! It finally works! Thanks so much for your help!
No problem, only happy to help. %20 and \040 are the same, I wasn't sure if %20 could be used in fstab, but I guess it's passed directly to samba, so it's up to samba to work it out. -- Per Jessen, Zürich (-4.6°C) http://www.hostsuisse.com/ - virtual servers, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (4)
-
george from the tribe
-
George from the tribe
-
nicholas
-
Per Jessen