I’ve kicked this around a few times and resigned myself to just using the non-DFS path to attach to. But we’ve recently changed some of the servers around and the paths have changed – obviously the DFS paths haven’t. So I thought I’d have a go at fixing the problem.
SMB is obviously working as I can connect to the share using the traditional path //servername/sharename
. But when trying to use the DFS version //domain.local/shares/sharename
it would fail to find the share.
This post provided the answer to my problems: http://mattslay.com/connecting-ubuntu-to-windows-shares-and-dfs-trees/
I added wins
into my /etc/nsswitch.conf
:
hosts: files wins dns mdns4_minimal [NOTFOUND=return]
I know, I’m not using wins, we don’t have wins, but let’s go there.
Then I edited my /etc/samba/smb.conf
and added/amended some wins details under the [global]
section. Using one of the domain controllers as the IP address.
wins server = 192.168.0.55 name resolve order = host wins bcast
Finally changed the -c
option in /etc/request-key.conf
to -t
on the cifs.spnego
line.:
create cifs.spnego * * /usr/sbin/cifs.upcall -t %kcreate cifs.spnego * * /usr/sbin/cifs.upcall -t %k
Now I can connect to the DFS path using the GUI file manager smb://domain.local/shares/sharename
or using the command line to mount the share.
$ sudo mount -t cifs //domain.local/shares/sharename /mnt/sharename --verbose -o username=myuser,vers=2.0
Hi, Can you start at the beginning and explain how you connect to a DFS share on a fresh install of RH Enterprise 9.x? What you installed, what files you configured, joining the domain etc. Thanks you very much.
LikeLike
This is a post from 5 years ago, back in the days of me working in an environment that was predominantly Windows and only me running Debian Linux on my desktop. These days I rarely encounter Windows, and I can’t really express how happy I am about that :) So I’m not in a position to require Samba, and have no Windows system I could test with.
I can’t really be specific with RedHat as it’s not a distro I’ve got great experience with. I can say that I won’t have installed anything more than samba fs (which should get you cifs-utils) ,and the keyutils mentioned in the linked article. Furthermore, I also would not have joined the Windows domain, I didn’t even use PAM LDAP, back then. I would have connected using mount as per the example:
“`shell
mount -t cifs //servername/sharename /mnt/temp –-verbose -o username=my_user_name,password=my_password,workgroup=DOMAIN_NAME
“`
http://mattslay.com/connecting-ubuntu-to-windows-shares-and-dfs-trees/
With all that said, I can strongly recommend that you get the DNS part of Windows and your Linux client working properly. Ensure `resolv.conf` has your domain controllers listed and the search domain correct. Make sure you can resolve short names and fqdn’s.
Good luck in your endeavours.
LikeLike
Thanks very much for the reply. I found what I needed here:
https://access.redhat.com/solutions/45070 and combined it with the info you published and all worked well.
Thanks again.
LikeLiked by 1 person
0 Pingbacks