LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 06-24-2010, 01:41 PM   #1
azm882
LQ Newbie
 
Registered: Jun 2010
Posts: 4

Rep: Reputation: 0
smartcard insert / removal event notification


Folks,

I'm working on an app that will authenticate user with a smartcard when the user inserts it in the card reader (this is on Red Hat 5.5). How do I detect a card has been inserted? Is there a daemon service I need to listen to and associated api to get notified etc? thanks in advance.
 
Old 06-24-2010, 01:49 PM   #2
smoker
Senior Member
 
Registered: Oct 2004
Distribution: Fedora Core 4, 12, 13, 14, 15, 17
Posts: 2,279

Rep: Reputation: 250Reputation: 250Reputation: 250
I would guess udev rules would be the way to go.
http://reactivated.net/writing_udev_rules.html
 
Old 06-24-2010, 02:05 PM   #3
azm882
LQ Newbie
 
Registered: Jun 2010
Posts: 4

Original Poster
Rep: Reputation: 0
smoker, thanks! I'll take a look at it.

However I forgot to mention that we'd need to get notified at red hat login screen level. would udev allow that at login level where user simply inserts to the card for authentication instead of entering user name password?

there is PAM level config you can do to authenticate a user without having to write your own app however we need to do some extra stuff due to which we need event notification (or detection of card insertion).
 
Old 06-24-2010, 02:52 PM   #4
smoker
Senior Member
 
Registered: Oct 2004
Distribution: Fedora Core 4, 12, 13, 14, 15, 17
Posts: 2,279

Rep: Reputation: 250Reputation: 250Reputation: 250
I honestly don't know about the login level. udev runs at boot, and can hold up device detection if one of your rules takes a long time. However, the login is well after device detection anyway, so I would have thought it would be a matter of interfacing your custom udev action rule with the PAM config somehow, short circuiting the login process. How you do that, again, I don't know - it's not something I've attempted.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
resolution change notification event?? pndhana Linux - General 2 09-22-2002 05:18 PM
event notification for resolution change?? pndhana General 6 09-22-2002 05:10 PM
event notification for resolution change pndhana Linux - Software 1 09-22-2002 05:05 AM
event notification for resolution change?? pndhana Linux - Newbie 1 09-22-2002 05:04 AM
event notification for resolution change?? pndhana Programming 0 09-21-2002 11:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:27 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration