Find the answer to your Linux question:
Results 1 to 3 of 3
Hi All, I just started reading on Linux. I have specific requirement. I want to get the user logon notification to my application on Linux. when any user logs in ...
  1. #1
    Just Joined!
    Join Date
    Jul 2009
    Posts
    1

    User logon notification

    Hi All,
    I just started reading on Linux. I have specific requirement. I want to get the user logon notification to my application on Linux. when any user logs in to the system, my application should get the notification and should get the details about the loged on session.
    The restriction is that the application will not poll for any specific file to get this information. Since polling will have the performance hit. Once my application gets notification, it will process that notification.

    I tried to check using bash_profile , bash_logout scripts but it has a limitation of working only in textual mode and is limited to bash shell.

    Is there any generic way to get the logon notification [compatible for both text and graphical mode, not limited to any shell] ?

    **Note:- I am using RedHat Linux

    Thanks in Advance
    Sanjay

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,974
    I would suggest that you get the source code to the login command and modify that to alert your application. Then, any login to the system can be monitored however makes sense to you.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Just Joined!
    Join Date
    Jul 2009
    Posts
    1
    You can also add some info in /etc/profile.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...