Results 1 to 3 of 3

Thread: Run script as root on logon OR send signal on logon

  1. #1
    Join Date
    Sep 2012
    Beans
    4

    Question Run script as root on logon OR send signal on logon

    Hi,

    I'm just teaching myself some Python and at the moment I want to program some sort of parental control thingy.
    So far I managed to create a script that runs automatically on startup (/etc/rcS and /etc/init.d) and one that runs automatically on shutdown so I can monitor how long the computer is turned on.
    But now I want to monitor which user is logged on when and for how long, so I've come up with two ideas:
    1. A script is run on logon - that needs to be run as root though so it can't be cancelled
    2. A signal is sent to the script on logon that is run on startup

    So now my only problem is to program one of these - any ideas?
    Last edited by jazzpi; March 7th, 2013 at 12:37 PM. Reason: Solved

  2. #2
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    8,999
    Distro
    Kubuntu 14.04 Trusty Tahr

    Re: Run script as root on logon OR send signal on logon

    Logins and logouts are logged automatically to /var/log/auth.log.
    If you ask for help, please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  3. #3
    Join Date
    Sep 2012
    Beans
    4

    Re: Run script as root on logon OR send signal on logon

    Thanks - That solves my problem
    Didn't know about that...

Tags for this Thread

Bookmarks

Posting Permissions

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