This script detects USB block device connection and logs out user after expiring his password. It aims to reduce copying of program during school/college computer lab classes.
- Python 3.6
- pyudev library
sudo pip3 install pyudev
sudo cp -i block-device-detect.py /bin
- Open Cron Jobs:
sudo crontab -e
- Append to last:
@reboot python3 /bin/block-device-detect.py.py &
sudo reboot