Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

UGENT, PLEASE HELP - Using Gina to login a user

Posted on 2004-04-17
6
Medium Priority
?
222 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
4 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
No security measures warrant 100% as a "silver bullet". The truth is we also cannot assume anything but a defensive and vigilance posture. Adopt no trust by default and reveal in assumption. Only assume anonymity or invisibility in the reverse. Safe…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

824 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