This forum has been archived. All content is frozen. Please use KDE Discuss instead.
The Discussions and Opinions forum is a place for open discussion regarding everything related to KDE, within the boundaries of KDE Code of Conduct. If you have a question or need a solution for a KDE problem, please post in the apppropriate forum instead.

KDM and Fingerprint Login on sony VAIO??

Tags: None
(comma "," separated)
muks
Registered Member
Posts
4
Karma
0
OS
Hi,

Has anyone got KDM and fingerprint login working on Sony VAIO laptops?
I read on google that some people got it working using GDM.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
I believe that although KDM does not show a user interface for fingerprint authentication, if PAM is configured to authenticate using Fingerprints then simply selecting the correct user and scanning is sufficient to make it work.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
muks
Registered Member
Posts
4
Karma
0
OS
bcooksley wrote:I believe that although KDM does not show a user interface for fingerprint authentication, if PAM is configured to authenticate using Fingerprints then simply selecting the correct user and scanning is sufficient to make it work.

any tutorial on how to setup PAM and KDM??
misteryx
Registered Member
Posts
13
Karma
0
OS
I'm also searching for such a tutorial since August.

I only found one to use fingerprint with su/sudo but to make it running with KDM would be very useful.
Service
Registered Member
Posts
1
Karma
0
hi guys

I wrote, what I use Fingerprint GUI (fingerprint-0.5) in KDM and kdesu and kscreensaver and it work wery well :)
I am little patch fingerprint (and send my patch author).
Now i am happy kdm+fingerprintgui with UPEK only driver user on sony vaio vgn-ux280P :)

# cat /etc/pam.d/kde
#%PAM-1.0
auth sufficient libpam_noguifingerprint.so
auth required pam_unix.so nullok
account include system-auth
password include system-auth
session include system-auth

# cat /etc/pam.d/login
#%PAM-1.0
auth required pam_securetty.so
auth required pam_tally.so file=/var/log/faillog onerr=succeed
auth required pam_shells.so
auth required pam_nologin.so
auth sufficient libpam_noguifingerprint.so
auth include system-auth
account required pam_access.so
account include system-auth
account required pam_tally.so file=/var/log/faillog onerr=succeed
password include system-auth
session required pam_env.so
session optional pam_lastlog.so
session optional pam_motd.so motd=/etc/motd
session optional pam_mail.so
session include system-auth

# cat /etc/pam.d/su | grep -vE '^$|^#'
auth sufficient pam_rootok.so
auth sufficient libpam_noguifingerprint.so
auth required pam_wheel.so use_uid
auth include system-auth
account include system-auth
password include system-auth
session include system-auth
session required pam_env.so
session optional pam_xauth.so

# cat /etc/pam.d/sudo | grep -vE '^$|^#'
auth include system-auth
auth sufficient libpam_noguifingerprint.so
account include system-auth
password include system-auth
session include system-auth
Permalink Send private email

Edited by Mamarok: removed excessive empty lines and advertising link
master_volkov
Registered Member
Posts
1
Karma
0
OS
My patch to thet fingerprint-0.5

diff -ur -x '*.o' fingerprint-0.5/include/globals.h fingerprint-0.5.KDE_AUTH_OK.FOR_DIFF/include/globals.h
--- fingerprint-0.5/include/globals.h 2008-10-26 00:05:41.000000000 +0400
+++ fingerprint-0.5.KDE_AUTH_OK.FOR_DIFF/include/globals.h 2009-01-04 05:37:28.000000000 +0300
@@ -101,19 +101,6 @@

#define CATCH_ENTER_KEY \
QFont font; \
- switch(e->key()){ \
- case Qt::Key_Enter: \
- case Qt::Key_Return: \
- device->stop(); \
- FONT_BOLD \
- statusBar()->showMessage(tr("ENTER pressed.")); \
- qApp->processEvents(); \
- syslog(LOG_DEBUG,"showMessage: ENTER pressed."); \
- usleep(SHOW_DELAY); \
- break; \
- default: \
- return; \
- }
-
+ return;

#endif /* _GLOBALS_H */
Только в fingerprint-0.5.KDE_AUTH_OK.FOR_DIFF: Makefile
diff -ur -x '*.o' fingerprint-0.5/src/fingerprintPAM.cpp fingerprint-0.5.KDE_AUTH_OK.FOR_DIFF/src/fingerprintPAM.cpp
--- fingerprint-0.5/src/fingerprintPAM.cpp 2008-10-24 15:39:42.000000000 +0400
+++ fingerprint-0.5.KDE_AUTH_OK.FOR_DIFF/src/fingerprintPAM.cpp 2009-01-04 05:32:11.000000000 +0300
@@ -118,14 +118,15 @@
// This is the waiting loop for a fingerprint result to be used, when no
// QtApplication can be created because we are called from a Qt application
// already. The app pointer points to the event queue of the calling application.
-int waitForResult(QApplication *app,PamGUI *gui,PamNonGUI *nonGui){
+int waitForResult(QCoreApplication *app,PamGUI *gui,PamNonGUI *nonGui){
volatile int result=-2;
- while(result==-2){
- if(gui!=NULL)result=gui->result;
- if(nonGui!=NULL)result=nonGui->result;
- app->processEvents();
- usleep(20000);
- }
+// while(result==-2){
+// if(gui!=NULL)result=gui->result;
+// if(nonGui!=NULL)result=nonGui->result;
+// app->processEvents();
+// usleep(20000);
+// }
+ result=gui->result;
return result;
}

@@ -271,12 +272,12 @@
devices->setMode(MODE_IDENTIFY);
devices->setIdentifyData(identifyData,numIdentify);

- if(display==NULL){
+// if(display==NULL){
// NonGUI fingerprint identification is not possible! here
// If we would implement this, the first tty would open the fingerprint device
// and GUI login would never be possible.
- }
- else{
+// }
+// else{
syslog(LOG_INFO,"Have X-display %s. Starting GUI login.",display);
QApplication *app;
if(calledFromQt){ // We are called from a Qt application; it becomes tricky now.
@@ -299,19 +300,19 @@
else{
lastResult=app->exec();
}
- }
- if(lastResult>=0){
+// }
+// if(lastResult>=0){
username=fingerprintData[lastResult]->getUserName()->data();
syslog(LOG_DEBUG,"Have index %d (user: %s).",lastResult,username);
pam_set_item(pamh,PAM_USER,(const void **)username);
rc=PAM_SUCCESS;
AUTH_RETURN
- }
- else{ // Our user has pressed ENTER. They want a "normal" login.
- rc=PAM_AUTHINFO_UNAVAIL;
- syslog(LOG_INFO,"Stop fingerprint login. Return %d (PAM_AUTHINFO_UNAVAIL).",rc);
- AUTH_RETURN
- }
+// }
+// else{ // Our user has pressed ENTER. They want a "normal" login.
+// rc=PAM_AUTHINFO_UNAVAIL;
+// syslog(LOG_INFO,"Stop fingerprint login. Return %d (PAM_AUTHINFO_UNAVAIL).",rc);
+// AUTH_RETURN
+// }
}
}

@@ -386,7 +387,7 @@
AUTH_RETURN
}
if(calledFromQt){ //use the wait loop
- lastResult=waitForResult(app,NULL,&nonGui);
+// lastResult=waitForResult(app,NULL,&nonGui);
}
else{
lastResult=app->exec();
diff -ur -x '*.o' fingerprint-0.5/src/PamNonGUI.cpp fingerprint-0.5.KDE_AUTH_OK.FOR_DIFF/src/PamNonGUI.cpp
--- fingerprint-0.5/src/PamNonGUI.cpp 2008-10-24 12:19:02.000000000 +0400
+++ fingerprint-0.5.KDE_AUTH_OK.FOR_DIFF/src/PamNonGUI.cpp 2009-01-04 05:40:58.000000000 +0300
@@ -106,21 +106,21 @@
if(!device->isRunning()) //Exit quietly if device is not running for some reason
return;

- string title=string("Fingerprint Login ");
- title.append(VERSION);
- pamMessage(PAM_TEXT_INFO,pamh,title.data());
- string s=string("Authenticating ");
- s.append(user);
- pamMessage(PAM_TEXT_INFO,pamh,s.data());
- s=string("Swipe your ");
- if(finger==NULL)
- s.append("finger");
- else
- s.append(finger);
- s.append(" or type ENTER to give password...");
- pamMessage(PAM_TEXT_INFO,pamh,s.data());
+// string title=string("Fingerprint Login ");
+// title.append(VERSION);
+// pamMessage(PAM_TEXT_INFO,pamh,title.data());
+// string s=string("Authenticating ");
+// s.append(user);
+// pamMessage(PAM_TEXT_INFO,pamh,s.data());
+// s=string("Swipe your ");
+// if(finger==NULL)
+// s.append("finger");
+// else
+// s.append(finger);
+// s.append(" or type ENTER to give password...");
+// pamMessage(PAM_TEXT_INFO,pamh,s.data());
enter=new KeyboardCatcher;
- connect(enter,SIGNAL(caughtLine()),this,SLOT(haveEnter()));
+// connect(enter,SIGNAL(caughtLine()),this,SLOT(haveEnter()));
enter->start();
START_TIMER
}
@@ -144,7 +144,7 @@
syslog(LOG_DEBUG,"showMessage: OK");
message.append("OK");
}
- pamMessage(PAM_TEXT_INFO,pamh,message.data());
+// pamMessage(PAM_TEXT_INFO,pamh,message.data());
//exit with index (match) as exit code
qApp->processEvents();
device->wait(10000);
diff -ur -x '*.o' fingerprint-0.5/src/PamTester.cpp fingerprint-0.5.KDE_AUTH_OK.FOR_DIFF/src/PamTester.cpp
--- fingerprint-0.5/src/PamTester.cpp 2008-10-24 17:56:19.000000000 +0400
+++ fingerprint-0.5.KDE_AUTH_OK.FOR_DIFF/src/PamTester.cpp 2009-01-04 04:19:39.000000000 +0300
@@ -82,12 +82,12 @@
// Grab the fingerprint device so we can use it again
if(fp_init()!=0){//init libfprint
syslog(LOG_ERR,"Unable to init libfprint.");
- return 0;
+ return;
}
#ifdef HAS_LIBBSAPI
if(ABSInitialize()!=0){//init libbsapi
syslog(LOG_ERR,"Unable to init libbsapi.");
- return 0;
+ return;
}
#endif
result->setText(message.data());


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot], ourcraft