免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2550 | 回复: 6
打印 上一主题 下一主题

有什么好办法限制lnx下usb的使用呢 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2012-04-06 14:02 |只看该作者 |倒序浏览
lnx下u盘会自动挂载,可以通过禁用haldaemon来阻止,有没有更彻底的办法,比如把某个usb mass storage驱动等改名呢?

论坛徽章:
13
技术图书徽章
日期:2014-04-29 14:15:42IT运维版块每日发帖之星
日期:2015-12-12 06:20:00IT运维版块每日发帖之星
日期:2015-08-30 06:20:00IT运维版块每日发帖之星
日期:2015-08-24 06:20:00IT运维版块每日发帖之星
日期:2015-08-02 06:20:002015年亚洲杯之澳大利亚
日期:2015-04-03 15:03:12申猴
日期:2015-03-20 09:00:292015年迎新春徽章
日期:2015-03-04 09:54:452015年辞旧岁徽章
日期:2015-03-03 16:54:15季节之章:冬
日期:2015-01-20 17:08:47双子座
日期:2014-11-21 16:30:31技术图书徽章
日期:2014-07-11 16:29:08
2 [报告]
发表于 2012-04-06 15:07 |只看该作者
There are 3 way to disable the USB storage device  on Red Hat Enterprise Linux .

1)

You can add the usb_storage driver to the blacklist.

Add the following line in the file /etc/modprobe.d/blacklist

blacklist usb_storage
Then when you restart the system, the system will not load the usb_storage driver.

2)

You can move the usb_storage.ko driver simply.

# mv /lib/modules/$(uname -r)/kernel/drivers/usb/storage/usb-storage.ko /root/
3)

You can use udev rule to ignore the usb storage plug in / out event .

Create file "ignore_usb_device.rules" in /etc/udev/rules.d/ directory and write the following rules:

# cat /etc/udev/rules.d/ignore_usb_storage.rules
ACTION=="add", bus=="usb", DRIVER=="usb-storage", OPTIONS:="ignore_device"
Then the system will ignore all use storage devices plug in / out event .

论坛徽章:
1
2015年辞旧岁徽章
日期:2015-03-03 16:54:15
3 [报告]
发表于 2012-04-06 15:55 |只看该作者
very good material, many 3ks

论坛徽章:
0
4 [报告]
发表于 2012-04-06 16:04 |只看该作者
2楼回答真详细,非常感谢!

论坛徽章:
13
技术图书徽章
日期:2014-04-29 14:15:42IT运维版块每日发帖之星
日期:2015-12-12 06:20:00IT运维版块每日发帖之星
日期:2015-08-30 06:20:00IT运维版块每日发帖之星
日期:2015-08-24 06:20:00IT运维版块每日发帖之星
日期:2015-08-02 06:20:002015年亚洲杯之澳大利亚
日期:2015-04-03 15:03:12申猴
日期:2015-03-20 09:00:292015年迎新春徽章
日期:2015-03-04 09:54:452015年辞旧岁徽章
日期:2015-03-03 16:54:15季节之章:冬
日期:2015-01-20 17:08:47双子座
日期:2014-11-21 16:30:31技术图书徽章
日期:2014-07-11 16:29:08
5 [报告]
发表于 2012-04-06 20:57 |只看该作者
^-^

论坛徽章:
1
申猴
日期:2013-10-18 10:42:24
6 [报告]
发表于 2012-04-07 12:53 |只看该作者
学习了。

论坛徽章:
4
CU大牛徽章
日期:2013-03-13 15:29:07CU大牛徽章
日期:2013-03-13 15:29:49CU大牛徽章
日期:2013-03-13 15:30:192015年迎新春徽章
日期:2015-03-04 09:57:09
7 [报告]
发表于 2012-04-07 17:30 |只看该作者
直接把usb的驱动给block掉
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP