Score:0

Mount a network-attached drive with xfs file system and username/password requirement

de flag

I am running Ubuntu 20.04.3 LTS, and I recently purchased a Buffalo LS210D27F network storage drive and attached it to my network. I can access the drive's dashboard through a web browser, but I do not seem to be able to mount it. Checking information, I see that the drive has an XFS filesystem, and that SMB is the only file sharing option enabled. It is set up with the recommended setting that it will switch automatically between SMB1 and SMB2. I believe SMB means I am using CIFS instead of XFS, but I just can't find any info on that.

To be safe, in addition to the below, I tried to run sudo mount -t xfs //[local IP]/[folder] /[mount point] and I got a message that the drive/folder combo does not exist.

I made sure both smbclient and cifs-utils were installed and up-to-date.

I ran smbclient -L //[local IP] and it asked for the password. When I entered it, I got the following output:

        Sharename       Type      Comment
        ---------       ----      -------
        IPC$            IPC       IPC Service (LinkStation)
        [folder]        Disk
        webaxs          Disk
        share           Disk      LinkStation folder
        info            Disk      LinkStation Utilities
SMB1 disabled -- no workgroup available

Next I tried sudo mount -t cifs -o username=[username],password=[password] //[local IP]/[folder] /[verified empty mount point] and the response was

mount error(22):Invalid argument
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)

Running dmesg showed

CIFS: Attempting to mount //[local IP]/[folder]
CIFS: VFS: cifs_mount failed w/return code = -22

This is a whole new topic for me. I thought it would be essentially plug-and-play, but the drive does not have instructions for Linux, and I cannot figure this out.

user10489 avatar
in flag
I hope you are replacing the `[word]` items with real parameters. SMB is a network protocol, and CIFS is the local linux implementation that presents the SMB API as a filesystem. The drive itself may use XFS, and CIFS is just your network interface to talk to it.
pokyCoder avatar
de flag
Yes, I am just obscuring my own information; I am uber-security conscious. I might take it a little far, but I'd rather be safe than sorry. At any rate, I appreciate that info about SMB and CIFS. Maybe I just was not using the right search terms, but I was not getting anywhere trying to find out if that was even the correct way to go.
user10489 avatar
in flag
No, `[word]` is fine, just wanted to make sure that someone wasn't taking the man page too literally. :)
Score:0
in flag

Return code -22 is one of the least useful messages as it's just a catch-all for "Something's wrong, but I don't know what". That said, it's sometimes necessary to add a few more details to -o, such as which local uid to use or adding nounix.

This is the command that I use to mount a Buffalo LS520D, which should be similar enough to yours:

sudo mount -t cifs -o uid=jason,username=jason,password=superSecretPassword //192.168.0.202/Backups /home/jason/Backups

A desktop system on the same network mounts the NAS at boot via fstab like this:

//192.168.0.202/Backups       /home/jason/Backups  cifs uid=1000username=jason,password=superSecretPassword,nounix 0 0

Other options that you may need to use in the -o section:

  • vers=2.0
    ⇢ The output of smbclient in your question shows that SMB 1.0 is disabled, so specifying 2.0 may be necessary.
  • sec=ntlm
    ⇢ This sets the security mode, with NTLM password hashing. This is generally the default for many NASes, though some may use the newer ntlmssp.

Hopefully something here will work for you as well.

pokyCoder avatar
de flag
I did see some tutorials with additional parameters like these. So far, no combination I have tried has worked. I posted the most-pared-down I had tried, but I got the same result just now adding `uid` and/or `nounix`.
in flag
Have you also tried the `vers=2.0` and `sec=ntlm` options? `vers` forces SMB 2.0 (since your output says 1.0 is disabled) and `sec` sets the security options
pokyCoder avatar
de flag
`vers=2.0` did the trick. Thanks a million. In case anyone else sees this, the `sec=ntlm` option broke it, my final input was `sudo mount -t cifs -o uid=root,username=[username],password=[password],nounix,vers=2.0 //[local IP]/[folder] /[verified empty mount point]`
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.