Click here to Skip to main content
16,005,141 members
Home / Discussions / C#
   

C#

 
GeneralDirectoryServices - NT authentication Pin
Ruchi Gupta16-Jul-04 6:51
Ruchi Gupta16-Jul-04 6:51 
GeneralRe: DirectoryServices - NT authentication Pin
Member 76135316-Jul-04 7:05
Member 76135316-Jul-04 7:05 
GeneralExcel App In Win Form Pin
Mehbub16-Jul-04 6:36
Mehbub16-Jul-04 6:36 
GeneralRe: Excel App In Win Form Pin
LongRange.Shooter16-Jul-04 9:19
LongRange.Shooter16-Jul-04 9:19 
GeneralExcel App in Win Form Pin
Mehbub16-Jul-04 6:29
Mehbub16-Jul-04 6:29 
GeneralUser rights in .NET Pin
Member 76135316-Jul-04 5:57
Member 76135316-Jul-04 5:57 
GeneralRe: User rights in .NET Pin
Nick Parker16-Jul-04 6:25
protectorNick Parker16-Jul-04 6:25 
GeneralRe: User rights in .NET Pin
Member 76135316-Jul-04 6:51
Member 76135316-Jul-04 6:51 
Hi Nick

Thanx for your reply!

Im used to checking user group memberships, as you specified in your second exaxple. However, this is a app for company, which would never ever allow me to change the structure of their Active Directory, adding my own groups etc.
I must find out how to check for the specific "SeServiceLogonRight" right on a user account.
The reason I need to check for this right is that I during install of a service prompt for a username/password, under which the service is configured and started. However, before allowing the user to bypass the install form prompting for the credentials, I want to make sure that the entered user credentials will actually work for the service "run as" credentials.

Besides this, its quite interesting on a general level for me (and others) to know how to actually check a user account for specific WinNT rights. The System.Secirity namespace obviously lacks functionality for this, and one is left to the mercy of the Win32 API.

Documentation clearly shows that for right checks one should use the LsaEnumerateAccountRights function. However, when I import it as you specified in your first code snippet, Im unable to determine what parameters I need to supply for it to work.

So, Im still not able to get my check down on code. But maby you, being more experienced than me (no MC++ exp what-so-ever) would be able to?
I challenge you to, given a user name and the corresponding password, to write a function, checking for the "SeServiceLogonRight" (or any other right for that matter) Smile | :) Or simply to sucessfully call the LsaEnumerateAccountRights function on a user account, as I should be able to evaluate the resulting string array of rights myself ...



/Zalkina
GeneralRe: User rights in .NET Pin
Nick Parker16-Jul-04 8:19
protectorNick Parker16-Jul-04 8:19 
GeneralRe: User rights in .NET Pin
LongRange.Shooter16-Jul-04 9:24
LongRange.Shooter16-Jul-04 9:24 
QuestionHow To Change the cursor direction? Pin
kings_116-Jul-04 5:39
kings_116-Jul-04 5:39 
AnswerRe: How To Change the cursor direction? Pin
Nick Parker16-Jul-04 6:06
protectorNick Parker16-Jul-04 6:06 
GeneralRe: How To Change the cursor direction? Pin
kings_116-Jul-04 10:23
kings_116-Jul-04 10:23 
GeneralRe: How To Change the cursor direction? Pin
Nick Parker16-Jul-04 12:04
protectorNick Parker16-Jul-04 12:04 
AnswerRe: How To Change the cursor direction? Pin
LongRange.Shooter16-Jul-04 9:30
LongRange.Shooter16-Jul-04 9:30 
Generalreading access database Pin
funaki16-Jul-04 3:14
funaki16-Jul-04 3:14 
GeneralRe: reading access database Pin
Nick Parker16-Jul-04 3:46
protectorNick Parker16-Jul-04 3:46 
GeneralRe: reading access database Pin
Anonymous16-Jul-04 7:37
Anonymous16-Jul-04 7:37 
GeneralCompact Framework Timer Pin
j1e1g116-Jul-04 2:31
j1e1g116-Jul-04 2:31 
GeneralRe: Compact Framework Timer Pin
Nick Parker16-Jul-04 2:44
protectorNick Parker16-Jul-04 2:44 
QuestionCompact Framework Progress Bar? Pin
j1e1g116-Jul-04 2:13
j1e1g116-Jul-04 2:13 
AnswerRe: Compact Framework Progress Bar? Pin
Colin Angus Mackay16-Jul-04 2:30
Colin Angus Mackay16-Jul-04 2:30 
AnswerRe: Compact Framework Progress Bar? Pin
Nick Parker16-Jul-04 2:32
protectorNick Parker16-Jul-04 2:32 
Generalhowto split strings using Regular Expression Pin
Stephan Wright16-Jul-04 0:47
Stephan Wright16-Jul-04 0:47 
GeneralRe: howto split strings using Regular Expression Pin
Bitwise Gamgee16-Jul-04 6:42
Bitwise Gamgee16-Jul-04 6:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.