I need a second pair of eyes here, please. I have a CentOS 6.6 server (let's call it 'S1") that has a Samba share on it that is currently working. We can mount that drive on our Windows work stations and transfer/delete from it just fine. It's setup as a "guest" config so no user specific passwords or any other restrictions like that. I'm trying to setup another server ("S2"), also CentOS 6.6 with autofs to mount that same share when it needs to. For some reason I can't seem to get it to work. I get no error message anywhere, no indication of a failure, nothing. So on S2 I have: $ cat /etc/auto.master /misc /etc/auto.misc /mnt/trex /etc/auto.trex /net -hosts $ cat /etc/auto.trex trex -fstype=cifs,rw,noperm,credentials=/etc/cifs-credentials-trex ://bigrip/TREX The file /etc/cifs-credentials-trex is present with the correct credentials, and the server also has in its /etc/hosts file an entry that tells it what IP that 'bigrip' machine is. Having done all of that and restarting the service (or even the whole machine) does not auto mount that share and I can't figure out why. I've completely disabled iptables on both machines, no luck. When I issue an smbclient command, I get this: $ smbclient -L bigrip -Uguest Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.6.23-14.el6_6] Sharename Type Comment --------- ---- ------- IPC$ IPC IPC Service (BRASCO) TREX Disk T-Rex I should point out that I have a nearly identical setup across two other machines that is working just fine. I say nearly identical because in that setup, the first server is actually a Windows Server system while the other is a CentOS6.6. I've tried as much as I can (or remember) and mirrored the same setup and config files. Nothing. So, what am I forgetting here?
On Wed, Jun 17, 2015 at 10:33 AM, Ashley M. Kirchner <ashley at pcraft.com> wrote:> I need a second pair of eyes here, please. I have a CentOS 6.6 server > (let's call it 'S1") that has a Samba share on it that is currently > working. We can mount that drive on our Windows work stations and > transfer/delete from it just fine. It's setup as a "guest" config so no > user specific passwords or any other restrictions like that. > > I'm trying to setup another server ("S2"), also CentOS 6.6 with autofs to > mount that same share when it needs to. For some reason I can't seem to get > it to work. I get no error message anywhere, no indication of a failure, > nothing. > > So on S2 I have: > $ cat /etc/auto.master > /misc /etc/auto.misc > /mnt/trex /etc/auto.trex > /net -hosts > > $ cat /etc/auto.trex > trex -fstype=cifs,rw,noperm,credentials=/etc/cifs-credentials-trex > ://bigrip/TREXIf I've read the files correctly, you might need to use /mnt/trex/trex for autofs to work. Can you try: /mnt /etc/auto.trex and see if that works as you intended? Akemi
Nope, that completely takes over '/mnt' and everything else that's in there becomes invisible. However, I do believe you're on to something here. Looking back at the other, working setup, I do realize now that I did the same, where the path was '/mnt/<something>' and the autofs mounts are within that, so they became '/mnt/<something>/<mount-point>' - so thanks for that hint. I'll go fiddle with it. On Wed, Jun 17, 2015 at 11:54 AM, Akemi Yagi <amyagi at gmail.com> wrote:> On Wed, Jun 17, 2015 at 10:33 AM, Ashley M. Kirchner <ashley at pcraft.com> > wrote: > > I need a second pair of eyes here, please. I have a CentOS 6.6 server > > (let's call it 'S1") that has a Samba share on it that is currently > > working. We can mount that drive on our Windows work stations and > > transfer/delete from it just fine. It's setup as a "guest" config so no > > user specific passwords or any other restrictions like that. > > > > I'm trying to setup another server ("S2"), also CentOS 6.6 with autofs to > > mount that same share when it needs to. For some reason I can't seem to > get > > it to work. I get no error message anywhere, no indication of a failure, > > nothing. > > > > So on S2 I have: > > $ cat /etc/auto.master > > /misc /etc/auto.misc > > /mnt/trex /etc/auto.trex > > /net -hosts > > > > $ cat /etc/auto.trex > > trex -fstype=cifs,rw,noperm,credentials=/etc/cifs-credentials-trex > > ://bigrip/TREX > > If I've read the files correctly, you might need to use /mnt/trex/trex > for autofs to work. Can you try: > > /mnt /etc/auto.trex > > and see if that works as you intended? > > Akemi > _______________________________________________ > CentOS mailing list > CentOS at centos.org > http://lists.centos.org/mailman/listinfo/centos > >
Ashley M. Kirchner wrote:> I need a second pair of eyes here, please. I have a CentOS 6.6 server > (let's call it 'S1") that has a Samba share on it that is currently > working. We can mount that drive on our Windows work stations and > transfer/delete from it just fine. It's setup as a "guest" config so no > user specific passwords or any other restrictions like that. > > I'm trying to setup another server ("S2"), also CentOS 6.6 with autofs to > mount that same share when it needs to. For some reason I can't seem to > get it to work. I get no error message anywhere, no indication of a > failure, nothing.<snip> Dumb question: is selinux enabled? mark
On Wed, Jun 17, 2015 at 12:21 PM, <m.roth at 5-cent.us> wrote:> Dumb question: is selinux enabled? >Yes, so is the other, working, setup.
Ok, I think I discovered an issue. It may be a "feature" but this is what has bitten me now. After making the above fixes with the proper paths, it still wasn't working. When I do an smbclient query, it gave me all the details indicating the share is there and available. however, autofs was still failing. When I tried a manual mount on the client, I would get: $ mount -t cifs //bigrip/trex /mnt/trex -o user=guest Retrying with upper case share name mount error(6): No such device or address Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) And on the server side I see this: CIFS VFS: cifs_mount failed w/return code = -6 On a hunch, I decided to make a small change on the server side. The samba configuration is set up with a server name and several aliases for the various shares, so the staff here can go to \\<server-name>\<path> and \\<server-alias>\<path> and have different access control, different files, and all that fun, but it's all on the same physical machine. The path I was trying to mount is on one of those aliases. So I made that change on the server, exporting the share on the real server name and now suddenly it's working. I can mount it with no problems, and autofs is working. When I switched it back to using the server alias, it fails. Interestingly, the Windows clients mounting this share, using the server alias, are working just fine. But for some reason that does not work when I try it from a CentOS machine.