Solved

UGENT, PLEASE HELP - Using Gina to login a user

Posted on 2004-04-17
6
208 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Free camera licenses with purchase of My Cloud NAS

Milestone Arcus software is compatible with thousands of industry-leading cameras for added flexibility. Upon installation on your My Cloud NAS, you will receive two (2) camera licenses already enabled in the software. And for a limited time, get additional camera licenses FREE.

Join & Write a Comment

In today's information driven age, entrepreneurs have so many great tools and options at their disposal to help turn good ideas into a thriving business. With cloud-based online services, such as Amazon's Web Services (AWS) or Microsoft's Azure, bus…
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…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

771 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now