473,416 Members | 1,801 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,416 software developers and data experts.

connecting programmatically to a linux samba share

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
Nov 22 '05 #1
4 4585
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
"Tyler Sample" <st**@qwest.net> wrote in message
news:f1**************************@posting.google.c om...
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

Nov 22 '05 #2
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
"Tyler Sample" <st**@qwest.net> wrote in message
news:f1**************************@posting.google.c om...
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

Nov 22 '05 #3
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 :)

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 22 '05 #4
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 :)

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 22 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Przemo Drochomirecki | last post by:
hi, does anyone knows how to connect to samba server (from windows) thx in adv. Przemo
4
by: Dan | last post by:
Hi, I'm planning to develop a small intranet to provide our organization with documents online. I've decided to do this using jsp/servlets using a tomcat server. For an operating system, I...
7
by: Dan V. | last post by:
Situation: I have to connect with my Windows 2000 server using VS.NET 2003 and C# and connect to a remote Linux server at another company's office and query their XML file. Their file may be...
11
by: Tony Baker | last post by:
In order for my company to go ahead and use .Net and C# (over java), I need to know how to install and run a C# ASP.Net application not only on Windows, but on Linux. I'm a Windows developer,...
2
by: Tyler Sample | last post by:
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,...
57
by: B.r.a.d.l.e.y | last post by:
A client has moved a back-end data file to a Linux machine instead of Windows. It now will only let one user log in at a time and gives some sort of "admin file not found" error. My first...
2
by: Brooks Clayton | last post by:
I have a split db created in A97. The backend currently resides on a Windows2000 machine and is accessed by front ends on other 2000 and Win98 machines all running A97, all on our local network. ...
14
by: Arjan | last post by:
Is there a way to connect to the Linux filesystem with C# without using Samba? I need it to get a configuration file from the server, edit it and place it back. And after that I need to restart a...
0
by: Lars | last post by:
I am using Microsoft .NET (2.0) PrintPreviewDialog and all works well when the Windows default printer is set to a local printer or a network printer on a Windows server, but if I set it to a...
3
by: Tim Golden | last post by:
Ronnie Kwok wrote: Can't you just mount the share (albeit temporarily) and copy the files over in the normal way? You haven't said what OS you're on, but I'm assuming Linux otherwise you'd...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.