connecting programmatically to a linux samba share

T

Tyler Sample

I've got a Samba share set up on a LINUX box. It's set up for
user-level access. A Windows user is mapped to a UNIX user. When
accessing through file explorer, a username/password box pops up, and
I type the UNIX user name mapped to my current windows user and the
SAMBA password.

My problem is that I now want to access a Samba share in C#, using the
ASPNET windows account. I have no idea how to do this. Basically, I
need to copy files to and from this share.

Can anyone provide me a place to start here? I don't need to
impersonate a different Windows user, or I could probably figure this
out....

Thanks,

Tyler
 
J

Jeff Dillon

Is this a Webform application? You can get IIS/ASP.NET to run under any
account...perhaps you could run it under your account, and refer to a mapped
drive (x:) that has already been connected

Jeff
 
T

Tyler Sample

It's actually a web service.

Well, the problem is not that I need to impersonate another Windows
user. It's easy enough to give the ASPNET windows account access to the
Samba share. But Samba also requires its own password and a UNIX login.

For example, if I may have a user like this:
WINDOWS USER: "ASPNET"
LINUX USER: "root"
SAMBA PASSWORD: "rootsSambaPassword"

So if ASPNET wants access to that share, it needs to send
"UNIXMACHINE\root" and "rootsSambaPassword" (encrypted) at some point.

My understanding is that only the ASPNET account would be allowed to
login as root if this were the only setup user.

Maybe I should be posting this to a Samba newsgroup :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top