|
-
May 14th, 2009, 03:17 PM
#1
How would i run my application as a admin insted of rightlicking and choose rus as?
I wrote a application that will unlock users when they get locked out. I need my application to authenticate and run as a admin user so it can unlock the locked out users when a normal user runs it. I need to have the the admin credentials stored inside my application so it authenticates first then unlocks the locked out users if you need to see my code i will be happy to post.
I dont want to add a text box for user or pass and give the person who will be using this a admin account.... not cool
and this admin account that will be stored inside my app will be monitored closely.
Thank you for your time
Summey
-
May 14th, 2009, 03:32 PM
#2
Re: How would i run my application as a admin insted of rightlicking and choose rus a
 Originally Posted by summey
I wrote a application that will unlock users when they get locked out. I need my application to authenticate and run as a admin user so it can unlock the locked out users when a normal user runs it. I need to have the the admin credentials stored inside my application so it authenticates first then unlocks the locked out users if you need to see my code i will be happy to post.
I dont want to add a text box for user or pass and give the person who will be using this a admin account.... not cool
and this admin account that will be stored inside my app will be monitored closely.
Thank you for your time
Summey
So, if the user doesn't have to enter a password to enable the account, I fail to see the security in that approach. Anyone could execute the program without trouble, so what would be the point?
-
May 14th, 2009, 03:38 PM
#3
Re: How would i run my application as a admin insted of rightlicking and choose rus a
the plant lead will have the application so if the user out on the floor locks out the terminal he can just click search and find the account and hit unlock done but because the lead is a normal user it wont work because my app requires you to run as admin ... I want to add admin creds inside my code they wont see it it wil be compiled and i cant just give them an admin account they will log in to there machine using that etc.. so i just want my program to start then when you click unlock it authenticates with Active directory with the account stored in my app then unlocks the locked out users
-
May 14th, 2009, 03:48 PM
#4
Re: How would i run my application as a admin insted of rightlicking and choose rus a
Hmmm...not sure how to address your problem, but my opinion is that the plant lead should still have to type in their password. That is the standard way of doing this stuff and for good reason; you cannot ensure that the program will never fall into the hands of someone else.
-
May 14th, 2009, 04:44 PM
#5
Re: How would i run my application as a admin insted of rightlicking and choose rus a
yeah but its only able to unlock a uses account they cant do anything else i mean of cores if they disassemble my app then yeah they could see the user and pass but those creds like i said before will be highly monitored. and and i can publish this to except updates then just change the password once a month or whatever and it will check for updates and change the password in the app.
-
May 14th, 2009, 04:53 PM
#6
Re: How would i run my application as a admin insted of rightlicking and choose rus a
 Originally Posted by summey
yeah but its only able to unlock a uses account they cant do anything else i mean of cores if they disassemble my app then yeah they could see the user and pass but those creds like i said before will be highly monitored. and and i can publish this to except updates then just change the password once a month or whatever and it will check for updates and change the password in the app.
what if they change their password? How will you know if you are storing credentials internally? I just don't think that it is a good approach.
-
May 14th, 2009, 07:00 PM
#7
Re: How would i run my application as a admin insted of rightlicking and choose rus a
there's a VBS file that you can download called ELEVATE that lets you script values into batch/powershell scripts
Last edited by dglienna; May 14th, 2009 at 07:06 PM.
-
May 14th, 2009, 07:04 PM
#8
Re: How would i run my application as a admin insted of rightlicking and choose rus a
no they wont have a clue what creds are in the application i just want to authenticated the application to it runs as a admin instead of having to right lick and run it as a admin then entering creds .... i will be changing the password for that account with in my app using updates for the program...
-
May 14th, 2009, 07:07 PM
#9
Re: How would i run my application as a admin insted of rightlicking and choose rus a
sorry. edited the post. looked up info.. MSDN Magazine Copyright. Should be free
-
May 14th, 2009, 07:09 PM
#10
Re: How would i run my application as a admin insted of rightlicking and choose rus a
 Originally Posted by summey
no they wont have a clue what creds are in the application i just want to authenticated the application to it runs as a admin instead of having to right lick and run it as a admin then entering creds .... i will be changing the password for that account with in my app using updates for the program...
OK. The problem is that, if the user is not an admin, the program cannot run as an admin by default. That is the security model. Otherwise, what would be the point of running as a limited user if you could just run programs that did things with administrative credentials? It just doesn't make sense...
-
May 14th, 2009, 07:14 PM
#11
Re: How would i run my application as a admin insted of rightlicking and choose rus a
Found it.
http://technet.microsoft.com/en-us/m...t.aspx?pr=blog
You should look into Powershell 2.0 CTP
That would allow you to create a batch like environment that you can INVOKE on a target machine
-
May 14th, 2009, 11:11 PM
#12
Re: How would i run my application as a admin insted of rightlicking and choose rus a
thank you for the link ill check that out i use powershell.
-
May 15th, 2009, 05:34 AM
#13
Re: How would i run my application as a admin insted of rightlicking and choose rus a
1. Hello, I have a similar case that I need to run my desktop application as admin or at least I need my system to display a message box to grant the permission for the run of the application
2. Do you know why even when I chose to run my application as admin, the application still stops running due to violation of access permit "You dont have permission to access C:\\somefolder" for example.
THANKSSS
-----
-
May 15th, 2009, 07:44 AM
#14
Re: How would i run my application as admin insted of rightlicking and choose run as
I'm trying to authenticate against active directory. Are you on a domain ?
-
May 16th, 2009, 10:58 AM
#15
Re: How would i run my application as a admin insted of rightlicking and choose rus a
this is what im talking about
http://msdn.microsoft.com/en-us/maga...135979.aspx#S9
Figure 12 Authenticating a User in AD LDS
Code:
// establish context with AD LDS
PrincipalContext ldsContext =
new PrincipalContext(
ContextType.ApplicationDirectory,
"sea-dc-02.fabrikam.com:50000",
"ou=ADAM Users,O=Microsoft,C=US");
// determine whether a user can validate to the directory
Console.WriteLine(
ldsContext.ValidateCredentials(
"user1@adam",
"Password1",
ContextOptions.SimpleBind +
ContextOptions.SecureSocketLayer));
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|