Ok sorry I took so long. Some important things came up after I made that last post. Had to go deal with it.

Anyways put this class in your program:-
Code:
Public Class WindowsAccount

    Const LOGON32_PROVIDER_DEFAULT As Integer = 0
    Const LOGON32_LOGON_INTERACTIVE As Integer = 2

    <DllImport("advapi32.dll", CharSet:=CharSet.Unicode)>
    Private Shared Function LogonUser(ByVal lpszUsername As String,
                                      ByVal lpszDomain As String,
                                      ByVal lpszPassword As String,
                                      ByVal dwLogonType As Integer,
                                      ByVal dwLogonProvider As Integer,
                                      ByRef phToken As IntPtr) As Boolean
    End Function

    <DllImport("kernel32.dll")>
    Private Shared Function CloseHandle(ByVal handle As IntPtr) As Boolean
    End Function

    Private _context As WindowsImpersonationContext

    Public Sub Login(ByVal userName As String, ByVal password As String)
        Dim winID As WindowsIdentity
        Dim token As IntPtr

        If Not LogonUser(userName, "", password, LOGON32_LOGON_INTERACTIVE, LOGON32_PROVIDER_DEFAULT, token) Then
            Throw New Exception("Login failed.")
        End If

        winID = New WindowsIdentity(token)

        _context = winID.Impersonate

        If Not CloseHandle(token) Then
            Throw New Exception("Failed to close token handle")
        End If
    End Sub

    Public Sub LogOut()
        _context.Dispose()
    End Sub

End Class
I just wrote that class and what does is cause the current thread to run in the context of another user, basically impersonating that user. You can use it like this:-
Code:
        
        Dim wa As New WindowsAccount

        'Log in as user "dingdong"
        wa.Login("dingdong", "password12345")

        'Print the user name of the currently logged in user to prove it works
        Debug.WriteLine(WindowsIdentity.GetCurrent.Name)

        'Log out
        wa.LogOut()

        'Print the user name of the currently logged in user
        'to prove we logged out
        Debug.WriteLine(WindowsIdentity.GetCurrent.Name)
So what you can do is use the class the log in as the user that has authorization to the Linux share and then run your normal StreamWriter code and see if it works. Note though, the user account must exist on the machine where that code is running. If it works it would give sufficient clues about what is actually happening internally to form an accurate hypothesis about what is going on.