Click here to Skip to main content
15,938,446 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I am trying to open a directory on our Linux server from using process.start. The code works fine on all the Windows boxes but when trying to open the Linux share an exception is thrown: Logon Failure: unknown user name or bad password.

I've tried everything I could think of and Googled till my eyes were buldging and bloodshot. What am I missing?

Here is my code:

Private Sub btnOpenLinuxDir_Click(sender As Object, e As EventArgs) Handles btnOpenLinuxDir.Click

        Dim password As New SecureString
        Dim pwd As String = "password"
        For Each c As Char In pwd

        Dim open As New ProcessStartInfo
        open.Domain = "servername"
        open.UserName = "user"
        open.Password = password
        open.FileName = "explorer.exe"
        open.StartInfo.Arguments = "@\\Linuxserver\C\usr\directory"
        open.UseShellExecute = False
    End Sub
ZurdoDev 16-Mar-15 16:55pm    
Can you access \\Linuxserver\C\usr\directory just by clicking in Start, Run?
jwrule 16-Mar-15 16:59pm    
Yes. We have Samba configured on our Linux server. If I manually enter the path in Windows I am asked for my username and password and can open the directory.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900