Path: gmd.de!xlink.net!howland.reston.ans.net!usc!elroy.jpl.nasa.gov!decwrl! sun-barr!koriel!male.EBay.Sun.COM!jethro.Corp.Sun.COM!legion!jeremy From: jer...@legion.Corp.Sun.COM (Jeremy Allison) Newsgroups: comp.os.ms-windows.programmer.win32 Subject: A few NT programming questions Date: 22 Jun 1993 16:27:16 GMT Organization: Sun Microsystems CTE Windows Group Lines: 41 Distribution: world Message-ID: <207bt4$ar8@jethro.Corp.Sun.COM> Reply-To: Jeremy.Alli...@sun.COM NNTP-Posting-Host: legion.corp.sun.com Keywords: Windows NT Ok, I have been reading the System services manual given out as postscript with the March Beta, and there are a few questions I would *really* appreciate anyone giving me an answer to. Actually, I'd appreciate an RTFM just as much, so long as you tell me *which* M to RTF :-). 1). How do you authenticate a user, given a user name and plaintext password ? I am coming to the conclusion that the answer lies in the registry (as it seems, do many things :-). I have trawled through the registry logged in as Administrator, and have found various interesting keys that correspond to SID's of users I have set up on my system, but no hint of how to get a password. I didn't expect it to be in plaintext, but it would help if I could authenticate someone. 2). How does your process, running as a Administrator level service, lower its own permissions to the level of a user requesting the service ? The system call ImpersonateNamedPipeClient() looks helpful in this regard - but I don't really want to use a named pipe - I would rather use sockets so I can communicate with a UNIX box. Is there a general mechanism to change my level of permissions to a particular user ? 3). Are process id's globally allocated across the WinNT, OS/2 and POSIX subsystems ? If so, how do I find out what they are ? Again, the registry would seem to be the place to look. Does every running process make an entry in the registry ? Is the source for psview available (this would seem to do exactly what I want) ? I looked in the samples directory but didn't see the source. On the whole I am starting to really like the NT model of doing things. The registry is a MAJOR improvement on the UNIX method of random text files in random places holding system configuration information. If I could just work out how to do these things (and I'm sure there'll be others as I do more with NT :-) I'd be a very happy camper. If I get answers, I'll summarize for the group. Thanks very much, Jeremy Allison. Std. Disclaimer : Me speak for SUN ! They don't even know I work for them.
Newsgroups: comp.os.ms-windows.programmer.win32 Path: gmd.de!xlink.net!howland.reston.ans.net!math.ohio-state.edu!cs.utexas.edu! uunet!microsoft!hexnut!johnhall From: johnh...@microsoft.com (John Hall) Subject: Re: A few NT programming questions Message-ID: <1993Jun23.171712.22920@microsoft.com> Date: 23 Jun 93 17:17:12 GMT Organization: Microsoft Corporation References: <207bt4$ar8@jethro.Corp.Sun.COM> Keywords: Windows NT Lines: 27 In article Jeremy.Alli...@sun.COM writes: | 1). How do you authenticate a user, given a user name and plaintext | password ? Either use WNetAddConnection2() [Not its intended purpose but it works for some situations] or do without. This capability is not in Win32. You aren't the first to ask for it. | 2). How does your process, running as a Administrator level service, | lower its own permissions to the level of a user requesting the service ? No generic Impersonation is provided by Win32 -- you have to use a supported IPC system, like Named Pipes. Again, you aren't the first to ask for this. | 3). Are process id's globally allocated across the WinNT, OS/2 and | POSIX subsystems ? If so, how do I find out what they are ? Again, | the registry would seem to be the place to look. Does every running | process make an entry in the registry ? Is the source for psview | available (this would seem to do exactly what I want) ? I looked in | the samples directory but didn't see the source. Look in Samples\SDKTOOLS\Pview. -- ------------------------- My comments are my own. They are independent and unrelated to the views of my company , relatives or elected representatives.