LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (https://www.linuxquestions.org/questions/ubuntu-63/)
-   -   Upgrade to 14.04 now can't mount Windows share (https://www.linuxquestions.org/questions/ubuntu-63/upgrade-to-14-04-now-cant-mount-windows-share-4175557786/)

michael.barnes 11-02-2015 10:41 AM

Upgrade to 14.04 now can't mount Windows share
 
I have an Ubuntu desktop in an Active Directory network. I ran 10.04 for several years, then recently upgraded to 14.04. I mount several Windows shares for daily use of various files. The "public" shares (general shares used by multiple users) mount with no problem. However, when I try to mount my personal My Documents share, I get a Permission Denied error. I can go back to my 10.04 installation and it mounts just fine. When I boot in 14.04 I get a permission denied error. The fstab entries are the same.

What has changed from 10.04 to 14.04 that would cause this problem? I have verified credentials and all are proper. If I put phony credentials in, the public shares give me a permission denied error also, so I know the system is reading them correctly.

Here is pertinent parts of my fstab file.

Code:

//10.33.8.18/SRN_Market/Common  /home/mbarnes/SRN-Common              cifs rw,auto,users,credentials=/home/mbarnes/.me,uid=mbarnes,gid=users  0 0
//DAL-S-ADC-12/SRN_Market/Engineering  /home/mbarnes/Engineering      cifs rw,auto,users,credentials=/home/mbarnes/.me,uid=mbarnes,gid=users  0 0
//DAL-S-ADC-12/SRN_Market/InformationServices        /home/mbarnes/IT        cifs rw,noauto,users,credentials=/home/mbarnes/.me,uid=mbarnes,gid=users  0 0
//10.33.8.18/SRN_Production /home/mbarnes/P-drive                      cifs rw,auto,users,credentials=/home/mbarnes/.me,uid=mbarnes,gid=users  0 0

//DAL-S-ADC-12/SRN_MyDocuments/michael.barnes/My\040Documents /home/mbarnes/MyDocuments  cifs rw,auto,users,credentials=/home/mbarnes/.me,uid=mbarnes,gid=users,sec=ntlm 0 0

Any ideas would be appreciated.

Prehistorik 11-03-2015 01:52 AM

I've probably run into similar problem after installing 14.04, and managed to fix it, but I don't remember exactly how.

Just a wild guess: try editing your credentials file (/home/mbarnes/.me), so it:

* does not contain any spaces around "="

* ends with a newline

It seems to me that the credential file parser in SMB client became stricter (dumber?) in 14.04. (Trusty Tahr also introduced Samba 4, is it a coincidence?)

Ratamahatta 12-02-2015 03:36 PM

Try this, may help:
 
Had a problem like this one before. I have an Ubuntu 12 and OpenSUSE 13 multiboot install.
On one system I could not specifiy the user as "user@domain" (or similar) but had to use une line in the credentials file for the user name and another for the domain. In both cases the files were not allowed to be readable by anyone else than root. So I put them in /root.
I think I put uid to root but set gid to users.
My 0.02.

michael.barnes 12-03-2015 10:48 AM

I have a single element per line cred file plus a newline at the end as follows:

Code:

username=michael.barnes
password=*********
domain=salem

With this, I get a "Credential formatted incorrectly: (null)" error.

Code:

mbarnes@srn-td-desk:~$ sudo mount -vv MyDocuments/
domain=salem
Credential formatted incorrectly: (null)
mount.cifs kernel mount options: ip=10.33.8.18,unc=\\DAL-S-ADC-12\SRN_MyDocuments,uid=1000,gid=100,user=michael.barnes,,domain=salem,prefixpath=michael.barnes/My Documents,pass=********
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

I take out the newline at the end and I get the same response, without the format error.

I can mount the public shares with no problem. Again, this problem exists in 14.04. I can boot into 10.3 and it mounts fine. I sure would like to get this fixed.

Ratamahatta 12-03-2015 12:39 PM

The problem is, mount.cifs almost always reports a permission error. So that error message really is more confusing than helpful. (I have no idea why they programmed it like that.)
The line mount.cifs outputs doesn't match your fstab entry you posted earlier. I suppose you changed the name of the "My Documents" folder to rule out any problem with the space.
Can you mount when giving all the needed options via command line? (I think you need the -o parameter and a comma-separated list of options like "user=...,password=...".) That way you might be able to confirm it works at all. Nautilus (as you're on Ubuntu) should be able to take an address like "smb://server/share" after you pressed [CTRL]-L and then ask for username, domain and password, and then show the share. Have you tried?

Prehistorik 12-04-2015 01:21 AM

Can you also try to remove sec=ntlm from the fstab entry? I guess it will let Samba detect the security mode automatically.

Prehistorik 12-04-2015 01:25 AM

Quote:

Originally Posted by Ratamahatta (Post 5459283)
The line mount.cifs outputs doesn't match your fstab entry you posted earlier. I suppose you changed the name of the "My Documents" folder to rule out any problem with the space.

I guess mount.cifs have splitted the server path into share UNC (unc=\\DAL-S-ADC-12\SRN_MyDocuments) and prefix path (prefixpath=michael.barnes/My Documents), so the fstab line did not change.

michael.barnes 12-28-2015 04:08 PM

Quote:

Can you also try to remove sec=ntlm from the fstab entry? I guess it will let Samba detect the security mode automatically.
I tried several permutations of the sec option, including ntlmv, ntlmv2, ntlmssp, etc. as well as without the entry at all with no results.

Quote:

Can you mount when giving all the needed options via command line? (I think you need the -o parameter and a comma-separated list of options like "user=...,password=...".) That way you might be able to confirm it works at all. Nautilus (as you're on Ubuntu) should be able to take an address like "smb://server/share" after you pressed [CTRL]-L and then ask for username, domain and password, and then show the share. Have you tried?
It does not work via the command line, either. I also tried in nautilus using the suggested format and got this:

Code:

Oops! Something went wrong.
Unhandled error message: Failed to mount Windows share: Invalid argument

Again, this is something that changed between 10.3 and 14.04. When I boot to 10.3, the share mounts with no problem. When I boot to 14.04, it won't mount.

Thanks for any help.


All times are GMT -5. The time now is 08:49 AM.