cant mount cifs share

  • The failed: Invalid argument error returned by mount can be quite misleading.

    Now to mount SMB1 shares like those of WindowsXP or old NAS, you need to use vers=1.0 and sec=ntlm options in the mount command line. The password can be empty if the share has guest access.

    Bash
    #!/bin/sh
    
    USER=guest
    PASS=
    SHARE=//myhost/myshare
    MOUNT_POINT=/storage/media/myshare
    
    mkdir -p "$MOUNT_POINT"
    mount -t cifs -o rw,vers=1.0,sec=ntlm,username="$USER",password="$PASS" "$SHARE" "$MOUNT_POINT"