首页 > 其他 > 详细

How to block use of USB Storage on RHEL.

时间:2015-10-30 10:53:05      阅读:289      评论:0      收藏:0      [点我收藏+]

In your production environment, you might want to block the use of USB Storage devices (like pendrive) and display a message to user who is trying to do so. This can be achieved by replacing the usb_storage module in following way:

[root@SwitchRoot ~]# vim /etc/modprobe.d/usb-storage.conf

install     usb_storage       logger "User with uid $UID is trying to use usb storage" && zenity --warning --text "USB Storage not allowed" 2> /dev/null || echo "USB Storage not allowed" > /dev/tty0


Verify it by using a pendrive or with the following command:

[root@instructor ~]# modprobe usb_storage
USB Storage not allowed

Above config will also generate a log message in /var/log/messages and will display a Graphical Notification on GUI.


How to block use of USB Storage on RHEL.

原文:http://bianliang.blog.51cto.com/10835708/1707977

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!