LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 12-20-2016, 03:10 PM   #1
Ook
Member
 
Registered: Apr 2004
Location: Hell, Arizona (July - 118 degrees)
Distribution: Slackware 14.2 soon to be Slackware 15
Posts: 699

Rep: Reputation: 131Reputation: 131
Change to mount in Slackware 14.2?


I updated a box from Slackware 14.1 to 14.2. Both 64 bit. Clean installs.

In fstab I have this: (sensitive info replaced with zzz)

//10.0.0.2/zzz/shared /mnt/zzz cifs user,noauto,rw,username=zzz,password=zzz,domain=zzz 0 0

This is so non-root users can mount the share to /mnt/zzz. I've had it like this for a very long time, and it always worked.

To make a long story short, with Slackware 14.2:

1) mount //10.0.0.2/zzz/shared no longer works, it gives "No such file or directory" error. It DOES work as root.

2) mount /mnt/zzz works as it always had and appears to now be the only way to make this work now for non-root users.

This is not the old permissions problem where mount.cifs was by default not setuid root, because if mount.cifs is setuid root, #1 above still doesn't work for non-root users. With Slackware 14.1, that was all that was needed to get #1 above to work.

My guess is that something was changed with mount, though I did not see it in the readme or changelog.

Anyone else notice this, and am I just missing something or was this an intentional change to mount?

And is there a way to get #1 above to work again? I have this in several systems, and when I upgraded my test box to Slackware 14.2, it stopped working. Either I figure a way to get it to work again, or I get to go change my systems to use #2 above, a bit of a PITA.
 
Old 12-20-2016, 09:18 PM   #2
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
Code:
man 8 mount.cifs
should tell you everything you need to know. (I don't use cifs mounts, so I don't know if the man page has what you need or not.)

If you've already read the man page, sorry for the noise.
 
Old 12-21-2016, 07:51 AM   #3
atelszewski
Member
 
Registered: Aug 2007
Distribution: Slackware
Posts: 948

Rep: Reputation: Disabled
Hi,

This works for me on 14.2:
Code:
//192.168.1.16/ola  /home/antezu/share/olab-ola  cifs  users,dir_mode=0700,file_mode=0600,noauto,rw,uid=antezu,gid=users,credentials=/home/antezu/.samba.olab.txt  0  0
and:
Code:
$ ls -ls /sbin/mount.cifs 
36 -rwsr-xr-x 1 root root 35464 Feb 11  2016 /sbin/mount.cifs*
--
Best regards,
Andrzej Telszewski
 
Old 12-21-2016, 08:57 AM   #4
Ook
Member
 
Registered: Apr 2004
Location: Hell, Arizona (July - 118 degrees)
Distribution: Slackware 14.2 soon to be Slackware 15
Posts: 699

Original Poster
Rep: Reputation: 131Reputation: 131
1) According to man 8 mount.cifs (and yes, I already RTFM), it should work. In Slackware 14.1 it does. In Slackware 14.2, it does not.

2) Changing mount.cifs permissions fixed the permission problem in Slackware 14.1. It also fixes the permission problem in 14.2, but the error message is now different. This time, instead of complaining about permissions, it simply says "No such file or directory"

I still believe it is permission related, because it works as root.

I have this in systems that has been working for years. I'm not trying to set up something new or reinvent the wheel, this used to work. All I did was update my test bed from Slackware 14.1 to 14.2 (this is why I never do an update to a production system without first testing it in my development and test environments - had I done so, my production systems would have come to a screeching halt, people start lining up at my office door with pitch forks, etc. It can get ugly).

I have another 14.1 box that is clean, I'll test that version, update to 14.2, play with it more and chronicle my adventures, and post results here. I want to see if I can duplicate this on another box.
 
Old 12-21-2016, 09:29 AM   #5
Ook
Member
 
Registered: Apr 2004
Location: Hell, Arizona (July - 118 degrees)
Distribution: Slackware 14.2 soon to be Slackware 15
Posts: 699

Original Poster
Rep: Reputation: 131Reputation: 131
Quote:
Originally Posted by atelszewski View Post
Hi,

This works for me on 14.2:
Code:
//192.168.1.16/ola  /home/antezu/share/olab-ola  cifs  users,dir_mode=0700,file_mode=0600,noauto,rw,uid=antezu,gid=users,credentials=/home/antezu/.samba.olab.txt  0  0
<snip>
--
Best regards,
Andrzej Telszewski

I have "user", not "users", and the manual says "user". It might ignore everything after the fourth character. I also don't set mode and file mode, and don't set uid or gid, nor do I use a credential file, I provide them on the line. Just for SNG, I tried it the way you have it, though the differences are subtle. Still did not work:

mount //10.0.0.2/zzz/shared
mount: //10.0.0.2/zzz/shared: No such file or directory

mount /mnt/zzz works like it always has.

What is interesting is that if I give it an invalid serivice:

mount //10.0.0.2/zzz/nothing_is_here

I get the exact same message, No such file or directory. The only reason I know the service is valid is that it works for root.
 
Old 12-21-2016, 11:59 AM   #6
Ook
Member
 
Registered: Apr 2004
Location: Hell, Arizona (July - 118 degrees)
Distribution: Slackware 14.2 soon to be Slackware 15
Posts: 699

Original Poster
Rep: Reputation: 131Reputation: 131
First my conclusion:

SOMETHING CHANGED BETWEEN SLACKWARE 14.1 AND 14.2

It might very well be buried in some man or other documentation, but I haven't seen it. I'm not always all that observant, so it's very possible I just missed it.

Now the results of my adventures with mount on Slackware 14.1 and 14.2:

This has been duplicated on three clean Slackware 14.1 boxes and two clean Slackware 14.2 boxes:

-------------------------------------------

First we take a clean Slackware 14.1 box

ls -ls /sbin/mount.cifs
32 -rwxr-xr-x 1 root root 32228 Jun 25 2012 /sbin/mount.cifs

This is the default, and prevents non-root users from using mount. If they try, they get:

This program is not installed setuid root - "user" CIFS mounts not supported.

Note the error message clearly tells you why it does not work. This is easily remedied with:

chmod 4755 /sbin/mount.cifs

which gives us:

ls -ls /sbin/mount.cifs
32 -rwsr-xr-x 1 root root 32228 Jun 25 2012 /sbin/mount.cifs

Now, mounting with //10.0.0.2/zzz/shared works, like it always has.

-------------------------------------------

Now we switch to a clean Slackware 14.2 box and repeat all of the above.

ls -ls /sbin/mount.cifs
36 -rwxr-xr-x 1 root root 35464 Feb 11 2016 /sbin/mount.cifs

This is expected.

Here is where things change. An attempt to mount does NOT give us the expected message of This program is not installed setuid root. Instead it tells us:

mount //10.0.0.2/zzz/shared
mount: //10.0.0.2/zzz/shared: No such file or directory

Nothing about not being setuid, just no such file or directory.

So we try to mount with the mount point:

mount /mnt/zzz
This program is not installed setuid root - "user" CIFS mounts not supported.

This is expected, since mount.cifs is not setuid.

So:

chmod 4755 /sbin/mount.cifs
ls -ls /sbin/mount.cifs
36 -rwsr-xr-x 1 root root 35464 Feb 11 2016 /sbin/mount.cifs

Now we try to mount with the path:

mount //10.0.0.2/zzz/shared
mount: //10.0.0.2/zzz/shared: No such file or directory

Nothing changes.

Try to mount using mount point:

mount /mnt/zzz

And it works.

The change is that if you try to use the service/path, in this case //10.0.0.2/zzz/shared, it no longer works, but tells you "No such file or directory". This is not a setuid issue. AND, interesting enough, it works for root.

It's probably a simple change somewhere, but I haven't yet found it.
 
Old 12-21-2016, 10:02 PM   #7
atelszewski
Member
 
Registered: Aug 2007
Distribution: Slackware
Posts: 948

Rep: Reputation: Disabled
Hi,

Oh, I haven't noticed that you're trying to use the server address+path instead of the mount point path.
In that case, I have the same behavior as yours.

--
Best regards,
Andrzej Telszewski
 
Old 12-21-2016, 10:44 PM   #8
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
This is likely an upstream thing. mount is part of the util-linux package. Slackware 14.1 came with 2.21.2 and Slackware 14.2 came with 2.27.1. There's a lot of changelogs between those versions, and I suspect you'd find something causing your mount problem in there. Now, whether that change was purposeful or a regression from another fix is up in the air until the offending commit is found.

http://git.kernel.org/cgit/utils/uti...util-linux.git

Unfortunately, there's almost 5500 commits between those two releases.

Code:
jbhansen@febtober:~/util-linux$ git rev-list 9f5e5bec9 ^ffec577fbc --count 
5479
 
Old 12-22-2016, 09:59 AM   #9
Ook
Member
 
Registered: Apr 2004
Location: Hell, Arizona (July - 118 degrees)
Distribution: Slackware 14.2 soon to be Slackware 15
Posts: 699

Original Poster
Rep: Reputation: 131Reputation: 131
Fortunately, mounting via mount point works. I had to change my systems to use that instead address/path.

At the same time this is going on, I updated PHP to a newer version and got bit by the sftp bug that stops certain functions from working. When two very weird things happen at the same time, you start to wonder what you did to break it before you consider that it is an actual bug in the programs, and not something stupid you did. It was a very fun day...
 
Old 12-22-2016, 10:16 AM   #10
Ook
Member
 
Registered: Apr 2004
Location: Hell, Arizona (July - 118 degrees)
Distribution: Slackware 14.2 soon to be Slackware 15
Posts: 699

Original Poster
Rep: Reputation: 131Reputation: 131
Quote:
Originally Posted by bassmadrigal View Post
This is likely an upstream thing. mount is part of the util-linux package. Slackware 14.1 came with 2.21.2 and Slackware 14.2 came with 2.27.1. There's a lot of changelogs between those versions, and I suspect you'd find something causing your mount problem in there. Now, whether that change was purposeful or a regression from another fix is up in the air until the offending commit is found.

http://git.kernel.org/cgit/utils/uti...util-linux.git

Unfortunately, there's almost 5500 commits between those two releases.

Code:
jbhansen@febtober:~/util-linux$ git rev-list 9f5e5bec9 ^ffec577fbc --count 
5479
I suspect it was inadvertent. At the same time, I was dealing with a similar bug in PHP that was "accidentally" introduced by security "fix". That PHP bug was a bit obscure, but the mount problem? I'm rather surprised it slipped through their regression testing. I can't be the only one out there that lets non-root users mount shares via server/path.
 
Old 12-23-2016, 07:02 PM   #11
Xsane
Member
 
Registered: Jan 2014
Posts: 186

Rep: Reputation: 134Reputation: 134
Quote:
Originally Posted by bassmadrigal View Post
This is likely an upstream thing. mount is part of the util-linux package.
It looks like a mount.cifs issue and that is not part of util-linux. Ook would need to compare using mount.cifs(8) directly, with the results of calling mount.cifs(8) indirectly via mount(8) to confirm which caused the changed behavior.
 
Old 12-23-2016, 07:59 PM   #12
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Quote:
Originally Posted by Xsane View Post
It looks like a mount.cifs issue and that is not part of util-linux. Ook would need to compare using mount.cifs(8) directly, with the results of calling mount.cifs(8) indirectly via mount(8) to confirm which caused the changed behavior.
Good catch! I don't know why I assumed cifs support was directly included in util-linux. Checking that shows there is a cifs-utils package, which 14.1 came with 5.5 and 14.2 came with 6.4. That's quite a bit smaller list, but it's still 129 commits.

Code:
jbhansen@febtober:~/cifs-utils$ git rev-list 487f46da ^e52b72af2 --count
129
@Ook, it might be beneficial to try building some of the releases between 5.5 and 6.4 to see if you can find where the issue popped up. The following will download the SlackBuild and the cifs-utils source from 5.6-6.3.

Code:
wget -r -nH --no-parent --cut-dirs=5 --reject="index.html*" https://slackbuilds.org/mirror/slackware/slackware64-14.2/source/n/cifs-utils/
cd cifs-utils
wget https://download.samba.org/pub/linux-cifs/cifs-utils/cifs-utils-{5.6,5.7,5.8,5.9,6.0,6.1,6.2,6.3}.tar.bz2
Then to build a particular version, just run the following, replacing the version number with the one you're intending to build.

Code:
VERSION=5.6 sh cifs-utils.SlackBuild
Then just upgrade the package and try to mount using the mount path. If you can duplicate, then try another version. Once you find version that introduced the issue, you can then view the commits for that release.
 
1 members found this post helpful.
Old 12-24-2016, 01:01 AM   #13
atelszewski
Member
 
Registered: Aug 2007
Distribution: Slackware
Posts: 948

Rep: Reputation: Disabled
Hi,

Quote:
Originally Posted by bassmadrigal View Post
If you can duplicate, then try another version. Once you find version that introduced the issue, you can then view the commits for that release.
This asks for git bisect ;-)

--
Best regards,
Andrzej Telszewski
 
Old 12-24-2016, 07:35 AM   #14
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Quote:
Originally Posted by atelszewski View Post
This asks for git bisect ;-)
Yeah, but it'd be smart to narrow it down to at least the release where the problem was first introduced
 
Old 12-24-2016, 10:13 AM   #15
laprjns
Member
 
Registered: Oct 2005
Location: Connecticut USA
Distribution: SalixOS
Posts: 206

Rep: Reputation: 108Reputation: 108
Maybe this?

Quote:
Originally Posted by mount.cifs(8)
Note
The cifs vfs accepts the parameter user=, or for users familiar with smbfs it accepts the longer form of the parameter username=. Similarly the longer smbfs style parameter names may be accepted as synonyms for the shorter cifs parameters pass=,dom= and cred=.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Mount samba share on Slackware: mount error(6) from mount.cifs frushiyama Slackware 11 01-22-2015 07:12 PM
[SOLVED] How do I change change the home directory to be owned by me and not root? Slackware theif519 Linux - Newbie 4 06-24-2011 12:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 01:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration