LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 05-16-2022, 05:13 AM   #1
vindalooman
LQ Newbie
 
Registered: May 2022
Posts: 4

Rep: Reputation: 0
CentOs7 Mount windows share problems


Hello

I am quite a linux newbie.
I have been asked to check the mount a windows share on a CentOs7 box, before working and now not working anymore (no clue from the customer on what could be changed)

Local mount point /backup
Windows share //xx.xx.xx.xx/000_BCK

I can ping the Windows machine with no problem

The local mount point exists

Code:
ls /backup
Prod  Test
I can see the share via smbclient

Code:
smbclient -L xx.xx.xx.xx -U backup -m SMB2
Enter SAMBA\backup's password:

        Sharename       Type      Comment
        ---------       ----      -------
        000_BCK         Disk
        ADMIN$          Disk      Amministrazione remota
        B$              Disk      Condivisione predefinita
        C$              Disk      Condivisione predefinita
        IPC$            IPC       IPC remoto
        VBRCatalog      Disk
Reconnecting with SMB1 for workgroup listing.
do_connect: Connection to xx.xx.xx.xx failed (Error NT_STATUS_RESOURCE_NAME_NOT_FOUND)
Unable to connect with SMB1 -- no workgroup available
fstab is configured as follows

Code:
cat /etc/fstab

#
# /etc/fstab
# Created by anaconda on Thu Jul 26 12:32:02 2018
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
//xx.xx.xx.xx/000_BCK          /backup   cifs    uid=1000,credentials=/var/.smb39,iocharset=utf8,noperm,vers=1.0 0 0

I verified the credential file and it contains the correct credentials (those I used with smbclient)

if I run sudo mount -a I get "Host is down" as message

Code:
sudo mount -a
mount error(112): Host is down
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
Commenting that line in fstab, mount -a works fine so that's the "offending" line

After some more googling, I tried to use smb 2 and now the error is different

I changed fstab to

Code:
//xx.xx.xx.xx/000_BCK          /backup   cifs    uid=1000,credentials=/var/.smb39,iocharset=utf8,noperm,vers=2.0 0 0
And now the error is

Quote:
mount error(13): Permission denied
and in dmsg I see

Code:
[2227599.842439] Status code returned 0xc000006d STATUS_LOGON_FAILURE
[2227599.842455] CIFS VFS: Send error in SessSetup = -13
[2227599.842993] CIFS VFS: cifs_mount failed w/return code = -13
...but (beginning of the post) with smbclient those credentials seems working fine

this is the content of /var/.smb39

Code:
user=backup
password=yyyyyyyyyyyyyyyy
I tried changing user to username but the result seems the same

There is no domain/workgroup specified in the credential file.
Could it be the problem?

I am kind of reaching my limit in googling for solutions.
Is there anything I should ask the customer to check?


Thanks for any hint to shed some light on this subject

VindalooMan
 
Old 05-17-2022, 04:56 PM   #2
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,857

Rep: Reputation: 1149Reputation: 1149Reputation: 1149Reputation: 1149Reputation: 1149Reputation: 1149Reputation: 1149Reputation: 1149Reputation: 1149
Check /backup permissions (although I don't expect any issues here)...

Code:
ls -l /backup
Check selinux permissions/logs as well perhaps.
 
Old 05-18-2022, 08:38 AM   #3
vindalooman
LQ Newbie
 
Registered: May 2022
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by ferrari View Post
Check /backup permissions (although I don't expect any issues here)...

Code:
ls -l /backup
Check selinux permissions/logs as well perhaps.
Hello

Code:
 ls -l /backup
totale 8
drwxr-xr-x 3 root root 4096 20 apr 21.30 Prod
drwxr-xr-x 3 root root 4096 20 apr 21.45 Test
The permissions appear ok, to my non-expert eye.
About selinux, it looks disabled

Code:
getenforce
Disabled
Code:
cat /etc/selinux/config

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of three two values:
#     targeted - Targeted processes are protected,
#     minimum - Modification of targeted policy. Only selected processes are protected.
#     mls - Multi Level Security protection.
SELINUXTYPE=minimum
VindalooMan
 
Old 05-18-2022, 02:42 PM   #4
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,857

Rep: Reputation: 1149Reputation: 1149Reputation: 1149Reputation: 1149Reputation: 1149Reputation: 1149Reputation: 1149Reputation: 1149Reputation: 1149
Use the mount command with verbosity to gain a better idea about why the mount fails...
Code:
sudo mount -vvv -t cifs -o uid=1000,credentials=/var/.smb39,iocharset=utf8,noperm,vers=2.0 //xx.xx.xx.xx/000_BCK /backup
Other than that, I would check for possible Windows updates that have changed network/share related settings.
 
Old 05-19-2022, 03:14 AM   #5
vindalooman
LQ Newbie
 
Registered: May 2022
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by ferrari View Post
Use the mount command with verbosity to gain a better idea about why the mount fails...
Code:
sudo mount -vvv -t cifs -o uid=1000,credentials=/var/.smb39,iocharset=utf8,noperm,vers=2.0 //xx.xx.xx.xx/000_BCK /backup
Other than that, I would check for possible Windows updates that have changed network/share related settings.
Hello
I tried and the result is not very conforting

Code:
sudo mount -vvv -t cifs -o uid=1000,credentials=/var/.smb39,iocharset=utf8,noperm,vers=2.0 //xx.xx.xx.xx/000_BCK /backup
mount.cifs kernel mount options: ip=xx.xx.xx.xx,unc=\\xx.xx.xx.xx\000_BCK,iocharset=utf8,noperm,vers=2.0,uid=1000,user=backup,pass=********
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)


[gio mag 19 10:11:34 2022] Status code returned 0xc000006d STATUS_LOGON_FAILURE
[gio mag 19 10:11:34 2022] CIFS VFS: Send error in SessSetup = -13
[gio mag 19 10:11:34 2022] CIFS VFS: cifs_mount failed w/return code = -13
A note: nowhere is specified the domain/workgroup of the Windows machine we are trying to access. Could it be a problem (even if customer refers that the mount worked until April, without Domain for what I can see)?
 
Old 05-19-2022, 04:14 AM   #6
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,857

Rep: Reputation: 1149Reputation: 1149Reputation: 1149Reputation: 1149Reputation: 1149Reputation: 1149Reputation: 1149Reputation: 1149Reputation: 1149
Quote:
A note: nowhere is specified the domain/workgroup of the Windows machine we are trying to access. Could it be a problem (even if customer refers that the mount worked until April, without Domain for what I can see)?
On the Windows server run
Code:
systeminfo | findstr /B "Domain"
or
Code:
wmic computersystem get domain
 
Old 05-19-2022, 08:40 AM   #7
vindalooman
LQ Newbie
 
Registered: May 2022
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by ferrari View Post
On the Windows server run
Code:
systeminfo | findstr /B "Domain"
or
Code:
wmic computersystem get domain
After more googling (and after the customer told us a CentOs update had been recently done) we found the problem

https://shocksolution.com/2019/10/23...hat-linux-7-6/

The solution is to add the domain to the credential file and switch to cifs 2.1

Thanks for the support
VindalooMan
 
Old 05-19-2022, 02:13 PM   #8
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,857

Rep: Reputation: 1149Reputation: 1149Reputation: 1149Reputation: 1149Reputation: 1149Reputation: 1149Reputation: 1149Reputation: 1149Reputation: 1149
As I suspected, you were connecting to a server as part of a domain. I could have told you that back in my first reply, if you had confirmed that you were requiring samba to authenticate with a Windows domain.

https://www.claudiokuenzler.com/blog...return-code-13
 
  


Reply



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
Any problem if I install CENTOS7 Workstation over CENTOS7 Server? Rich Strebendt Linux - Software 5 05-03-2018 11:05 PM
[SOLVED] fstab doesn't mount /tmp on local partition, but mount -a does... (CentOS7, EBS volume on AWS) applebag Linux - Newbie 17 10-19-2016 01:51 PM
[SOLVED] [Centos7] Samba update screws up my system? Can no longer share the root directory. comcastuser Linux - Software 14 07-17-2016 05:51 PM
[SOLVED] (yet more) Mounting troubles! Centos7 can't mount a share, that previously was. borgy95 Linux - General 2 04-27-2015 05:55 AM
mount windows share export to samba share -> improve network performance tuning newuser77 Linux - Server 1 07-23-2008 11:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 08:41 PM.

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