?
Solved

UGENT, PLEASE HELP - Using Gina to login a user

Posted on 2004-04-17
6
Medium Priority
?
218 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 2000 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

As I write this article, I am finishing cleanup from the Qakbot virus variant found in the wild on April 18, 2011.  It was a messy beast that had varying levels of infection, speculated as being dependent on how long it resided on the infected syste…
Recently, I read that Microsoft has analysed statistics for their security intelligence report. It revealed: still, the clear majority of windows users do their daily work as administrator. An administrative account is a burden, security-wise. My ar…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses
Course of the Month13 days, 13 hours left to enroll

800 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