2

I am trying to mount a network drive to my AlmaLinux box, and are running out of ideas.

I want to mount the folder "project" with:

sudo mount -t cifs --verbose -o username=$USER,uid=$USER //company.com/shares/project /mnt/project

The response is:

Password for initials@//company.com/shares/project:
mount.cifs kernel mount options: ip=*.*.*.*,unc=\\company.com\shares,uid=1000,user=initials,prefixpath=project,pass=********
mount error(4): Interrupted system call
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)(dmesg)

dmesg responds with

[106100.323781] CIFS: Attempting to mount \\company.com\shares
[106100.670441] CIFS: VFS:  BAD_NETWORK_NAME: \\company.com\shares
[106101.138732] CIFS: VFS:  BAD_NETWORK_NAME: \\company.com\shares
[106101.218723] CIFS: VFS: cifs_mount failed w/return code = -4

With the same command I can connect to another folder in shares/, like project2, this dir I mounted a long time ago without issue, and I can mount and unmount this with no issue.

I am also able to mount the entire /shares, where I can cd into project2, but not project.

I have tried on another machine, where I can mount without issue, so it is not some folder permissions that are the issue. Also, my colleagues can't mount on this machine with their logon.

On the other machine after mounting dmesg also has BAD_NETWORK_NAME, so that should not be the problem.

Do you have any ideas I can try to fix this issue?

6
  • Can you access the folder through Windows – and what do you see in the folder's "Properties > DFS" tab? Commented Jun 27 at 7:14
  • Yes, I can access the folder both through Windows and through Linux on another machine than mine, even with the same login. I see Path: \\fileshare04\shares$\project Active: Yes, Status:
    – Alex
    Commented Jun 27 at 7:30
  • 1
    Can your Linux machine mount //fileshare04/shares$/project directly, or even resolve the hostname fileshare04 in general? Do you see the same kind of path for the other project folders (which work) – e.g. are they on the same fileshare04 server, and do they also use a bare hostname vs a full domain name? Commented Jun 27 at 7:37
  • With sudo mount -t cifs --verbose -o username=$USER,uid=$USER //fileshare04/shares$/project /mnt/project i get mount error: could not resolve address for fileshare04: Unknown error The one I can access is on fileshare24. I am not quite sure what you mean with the last part?
    – Alex
    Commented Jun 27 at 7:51
  • I mean "is it fileshareXX or is it fileshareXX.example.com?" (Do you get any results from host fileshare04 – with or without the .example.com added? Can you ping that server?) Commented Jun 27 at 8:13

1 Answer 1

1

\\company.com\shares is a MS-DFS share, where certain folders are redirects (DFS junctions) to other shares stored on other servers. The DFS junctions are followed by the client, so the client needs to be able to resolve the hostnames of every server involved.

By default DFS does not use full domain names of the servers – instead of \\foo.example.com it uses just \\foo, so the client host must know that it needs to add .example.com when resolving the hostname. (Even if the DFS share was reconfigured to use full domain names, I think this only applies to junctions created after that point.)

Usually this means you need to add search example.com to your /etc/resolv.conf (or to whichever configuration tool you use to set up networking):

# nmcli con modify "Ethernet" ipv4.dns-search example.com
# nmcli con up "Ethernet"
# ping fileshare04

Windows systems automatically have this kind of configuration done when they're joined to the AD domain, so the usage of short names doesn't affect them as much.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .