Solved

UGENT, PLEASE HELP - Using Gina to login a user

Posted on 2004-04-17
6
215 Views
Last Modified: 2013-12-04
Im writing a custom Gina,

at the end I want to login username x with password y

how do I tell windows to login this uer, with eir password y?

Is there any extremely easy way? Or maybe a way to capture the UI inout boxs of the original GINA, and overwrite them before the authentication function is actually invoked?

Thanks for any help,
I really appreciate it!
0
Comment
Question by:AruneshGupta
  • 2
6 Comments
 
LVL 7

Expert Comment

by:IceRaven
ID: 10848197
Hi AruneshGupta,

Here is a sample GINA Project

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcsample98/html/vcsmpginasample.asp

I think LsaLogonUser is used logon user for the system.

Cheers,
IceRaven
0
 
LVL 10

Expert Comment

by:Mercantilum
ID: 10848848
This is what you need http://beta.experts-exchange.com/Programming/Q_20672582.html
(see the Accepted answer)

Also, some advices about creating a Gina : http://wwwthep.physik.uni-mainz.de/~frink/newgina_pre09/readme.html
0
 

Author Comment

by:AruneshGupta
ID: 10876201
While I could implement the entire W1xLoggedOutSAS function in GINA,
and in the following code fragment:

// Attempt to log on the user.
// Assignments for pwszUser, pwszDomain, and pwszPassword
// handled elsewhere.
  if (!LogonUser(pwszUser,
                 pwszDomain,
                 pwszPassword,
                 LOGON32_LOGON_UNLOCK,
                 LOGON32_PROVIDER_DEFAULT,
                 phToken))
    return WLX_SAS_ACTION_NONE;

send my own pwszUser, pwszPassword

It would be easier if I could just re-assing the above 2 variables somehow, and let the original W1xLogged OutSAS run normally.

Any idea how I might be able to assign/access these variables ?


(P.S.
when i try the msdn sample implementation of this function
it says these 2 variables are assigned elsewhere
and when I try and compile, my code obviously does not find them/compile!
what is goind on?
Also where is the type PG_CONTEXT declared -  my only other compile error.)
0
 
LVL 10

Accepted Solution

by:
Mercantilum earned 500 total points
ID: 10876341
You have actually in your Gina to get this function WlxLoggedOutSas ready when user does ctrl-alt-del.

A nice easy to read implementation of WlxLoggedOutSas
    http://pgina.xpasystems.com/docs/wlxFuncs_8c-source.html

With Explanations
    http://pgina.xpasystems.com/docs/wlxFuncs_8c.html#a4


If you mean to actually bypass Gina and do a kind of "su" (same as unix), you can have a look to "su.c" from cygwin
    http://www.cygwin.com/
Download the file "su.c", it is an implementation of su for Windows.

In this case, you could have 2 users logged in at the same time: one being the desktop one - common one, and the other one, would be, for instance, in a command prompt window, logged in using the code provided by cywgin (su).
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Recently, a new law in my state forced us to get a top-to-bottom analysis of all of our contract client's networks. While we have documentation, it was spotty at best for some - and in any event it needed to be checked against reality. That was m…
OfficeMate Freezes on login or does not load after login credentials are input.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

713 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question