Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access Control - Need help please 1

Status
Not open for further replies.

Zyrenthian

Programmer
Mar 30, 2001
1,440
US
Ok all, I just got an interesting request to see if I can figure out a way to gain access with prior knowlege of username and password to a file.

Here is the situation. The user is logged in as NULL user so access to files is limited. If it wants to access a file, it gets an error. For example... if you are on a network and try to access someone elses files that they only have permission to access, you get a dialog asking for network logon and password.

Currently I am looking into the SDK under access control. I am trying to see what API calls I can make to gain access to these files.

I dont know if I explained this clearly so If you need more clarificaiton, please post. I am a bit overwhelmed with all the information so a nudge in the right direction would be great.

Thanx in advance

Matt
 
Network access, like, I'm logged in as billyjoebob, and I need administrative access to map a drive, so I put in the administrator password and username and it gives me access while staying on my username...right? ----------------------------------------
The Learning process is just a way to get rid of all the stupids in your head.

Now where's that cute kitten? ;-)
 
Here is the current situation I am trying to do. On another machine on the network, on a shared drive, I created a new text document and set the file permissions to the user of that machine and ONLY that user. I want use my program to change users WITHOUT promting the user for a user id and password. The program then thinks that I am that user and I can open the file.

matt
 
Implement a COM object with interface IDiskQuotaControl John Fill
1c.bmp


ivfmd@mail.md
 
John,
Never had to do that before... how would i begin?

matt
 
In general, you don't need a different COM object for it. You should get this interface from the system. John Fill
1c.bmp


ivfmd@mail.md
 
I think yes, but I don't know exactly how. John Fill
1c.bmp


ivfmd@mail.md
 
Ok... thanks =)

I am still open to other ideas as well so if anyone has any please post.

Thanx again

Matt
 
Check out the API functions:

ImpersonateLoggedOnUser
ImpersonateSelf

This two functions, impersonate the current process or thread as another logged or not logged user.

Hope this helps,

Let me know if you succeed in something, I am interested, too. s-)

Blessed is he who in the name of justice and good will, shepards the week through the valley of darknees...
 
I was going down the path of ImpersonateLogonUser but it seems I have a small problem. The system is running as NULL user so there are problems with it. My first attempt was to map a network drive as another person but that failed. Then I tried logon user which worked as me but in order to make it work I need to set the user settings for the current user to "Act as Opperating System" in the user manager. I dont know how to set a NULL user to opperate as Opperating System. I think I am going to have to throw out this idea. Thank you for all your input and if you know of a way to get the NULL user to behave as I want please let me know. I think what I will now have to do is go down the path of having a second process that runs as a non-null user and have the 2 processes talk to each other.

Matt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top