 |
SoftTree Technologies
Technical Support Forums
|
|
Author |
Message |
Harshal
Joined: 20 Apr 2007 Posts: 3 Country: India |
|
Runas Command library |
|
Hello Everyone ,
I am newuser on this site . I have register today itself.
I want to use Runas funcationality programatically . So can you provide me with library . If i am demanding some wrong thing then sorry for that .
My funcationality doesnot allow me for user instervention to enter password. As I use Runas functionality in windows 2000 . I have to enter password from user.
so can anybody help for the same. Any sugeetion will be helpful to me.
|
|
Fri Apr 20, 2007 1:40 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7969
|
|
|
|
Password needs to be specified on the command line as second parameter, for example
RunOne.exe my_user my_password my_program.exe parameters_for_my_program
|
|
Fri Apr 20, 2007 8:35 am |
|
 |
Harshal
Joined: 20 Apr 2007 Posts: 3 Country: India |
|
|
|
Hi Admin ,
I know that I have to specify password from command line . But as I told that i dont want User Intervention , so is there any other way to give password without human interaction.
One more problem is that my LogonUser Failes with error code 1314 . I have gone throgh many sites . I know that user must have SC_TCB_NAME previlege , but how to set that previlege . After this I can pass handle return by above API to CreateProcessAsUser API .
any help ?
Thanks
Harshal
|
|
Fri Apr 20, 2007 9:20 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7969
|
|
|
|
Hi,
You are looking in the wrong place. It is a simple as the following one time change - no coding is needed.
If the target user is local user, go to Admin Tools in Windows Control Panel then go to Local Security Policy then Local Policies then User Rights Assignments then give that use Logon as batch job privilege, restart the system or logoff/logon to make Windows update internal security cache. In case if the target user is a network user, use same functions in the Active Directory to give him/her the required privilege.
Also, the account executing RunAs (not the target user account) needs to have Act As Part Of Operation System privilege, which can be granted using same method described above. Don't assume that admin accounts have all privileges by default. This is just not the case, especially in XP and vista.
|
|
Fri Apr 20, 2007 9:56 am |
|
 |
Harshal
Joined: 20 Apr 2007 Posts: 3 Country: India |
|
|
|
Thanks a lot admin !
It's working now. but tell me is that dependant on Runas Service which is windows service. Can I do the same thing without RunAs service .
thanks a lot ! My work is proceeded .
Harshal
|
|
Wed Apr 25, 2007 4:22 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7969
|
|
|
|
No it is not depended on that service. Hope this helps.
|
|
Wed Apr 25, 2007 8:59 am |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|