Score:0

Unable to mount CIFS share using mount.cifs using AD credentials on Centos 7

bt flag

I'm trying to mount a CIFS share from a storage array on a Centos7 machine, and I'm failing miserably.

sudo mount -t cifs -o vers=2.1,user=domain/myuser //storagearray/Server_Backups  /tmp/dbshare/

[sudo] password for myuser:
Password for domain/myuser@//storagearray/Server_Backups:  ***********
mount error(22): Invalid argument
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

I've increased the loglevel in dmesg: echo 7 > /proc/fs/cifs/cifsFYI and get this:

[17390.404309] CIFS VFS: Unable to select appropriate authentication method!
[17390.404313] CIFS VFS: Send error in SessSetup = -22
[17390.404381] CIFS VFS: cifs_mount failed w/return code = -22

I'm able to list the share using smbclient and my credentials, and I'm also able to mount the share using the Nemo file manager on the Centos7 desktop. Windows Server is also able to mount the folder.

[myserver ~]$ smbclient  -v -U domain/myuser -L //storagearray/Server_Backups
Enter domain/myuser's password:

    Sharename       Type      Comment
    ---------       ----      -------
    Server_auto Disk
    Server_Backups Disk
    Server_audit Disk

Reconnecting with SMB1 for workgroup listing.
do_connect: Connection to storagearray failed (Error NT_STATUS_IO_TIMEOUT)
Unable to connect with SMB1 -- no workgroup available

Increasing the loglevel on smbclient I can see that smb2.1 is being negotiated:

smbclient -dl=5 -v -U domain/myuser -L //storagearray/Server_Backups
...
[2023/05/12 11:34:32,  4] ../../source3/libsmb/clidfs.c:227(do_connect)
   negotiated dialect[SMB2_10] against server[storagearray]

Any other schemes or options I should try? I've looked into getting Nemo to try and dump information about its' SMB connection but have been unsuccessful.

Other things I've tried:

  • vers=4.0 (1.0, 2.1)
  • sec=krb5
  • sec=ntlm

Cifs-utils version: cifs-utils-6.2-10.el7.x86_64

smbclient version: samba-client-4.10.16-19.el7_9.x86_64

djdomi avatar
za flag
show the smb conf of the server, and moreover smb1 is dead imho
mrlitsta avatar
bt flag
Unfortunately, the server is a vendor storage appliance (pure flashblade), so the SMB configuration is somewhat hidden from me. It claims in the UI that it's SMB 4.1. I'm trying to get logs from it to see what it's doing.
djdomi avatar
za flag
then please provide the full details or as currently stated the question might be off topic and for this edit the question instead of commenting
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.