How to access share using specific credentials?
- From: "Ian Boyd" <ian.msnews010@xxxxxxxxxxxx>
- Date: Tue, 10 Jul 2007 13:41:18 -0400
Our application needs to write a file into a share on a network server. The
account that the application is running under does not have access to the
share.
But we have been given a username and password that is valid on the target
machine (and that target machine only - it's an accout local to that
machine - and not on the domain).
If the application tries to write to the share, it gets access denied. But
if i first interactivly browse to the share myself, i am prompted to enter a
username and password. So i enter
User name: DEATHSTAR\IanWork
Password: mypassword1
And i can see and access the shares. At this point, it appears that my
credentials are cached someplace in memory. If i close explorer and try to
once again browse to the share, i can see them straight away - without
having to enter the credentials.
What i need, is to find dozen or so API calls that duplicate this
functionality but in a non-interactive say (i.e. from a service)
The best i can find are a confusing hodgepodge of api calls, with names like
AcquireCredentialsHandle, InitializeSecurityContext and the like. But none
let me pass in a username, password and machine name.
.
- Prev by Date: Re: Cant get SACL
- Next by Date: Re: Does anyone back up Certificates?
- Previous by thread: Re: Does anyone back up Certificates?
- Next by thread: Re: How to access share using specific credentials?
- Index(es):
Relevant Pages
|