Ubuntu12.04桌面版如何禁止U盘自动挂载?

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
回复
Spades7
帖子: 7
注册时间: 2014-10-15 16:32
系统: ubuntu12.04

Ubuntu12.04桌面版如何禁止U盘自动挂载?

#1

帖子 Spades7 » 2015-01-08 10:11

搜索了很多,大部分都采用如下方法:
在终端输入:

gconf-editor

在出来的界面中依次找到:
/apps/nautilus/preferences/media_automount
/apps/nautilus/preferences/media_automount_open

这两个选项,把勾勾去掉就可以了,根据里面的描述:
第一个选项是是否自动挂载,第二个是是否自动打开

但是在12.04中根本找不到这两项啊,哪位大神清楚这个?如何禁止?
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: Ubuntu12.04桌面版如何禁止U盘自动挂载?

#2

帖子 poloshiao » 2015-01-08 12:15

如何禁止U盘自动挂载?
在 /etc/fstab 加上 noauto 參數
這樣 就必須有明確的掛載指令 才會掛載
還可以指定 uid 或 gid 等等權限 限制哪些人才可以下掛載指令

1. https://help.ubuntu.com/community/Autom ... stem_table
<options>
noauto (do not mount when "mount -a" is given, e.g., at boot time), user (allow a user to mount), and owner (allow device owner to mount), and comment (e.g., for use by fstab-maintaining programs)
2. http://en.wikipedia.org/wiki/Fstab
auto / noauto
With the auto option, the device will be mounted automatically at bootup or when the mount -a command is issued. auto is the default option. If you do not want the device to be mounted automatically, use the noauto option in /etc/fstab. With noauto, the device can be only mounted explicitly.
头像
tang.zhe
帖子: 1505
注册时间: 2010-07-15 13:31

Re: Ubuntu12.04桌面版如何禁止U盘自动挂载?

#3

帖子 tang.zhe » 2015-01-08 14:33

:em04
附件
u.png
Spades7
帖子: 7
注册时间: 2014-10-15 16:32
系统: ubuntu12.04

Re: Ubuntu12.04桌面版如何禁止U盘自动挂载?

#4

帖子 Spades7 » 2015-01-08 14:47

poloshiao 写了:
如何禁止U盘自动挂载?
在 /etc/fstab 加上 noauto 參數
這樣 就必須有明確的掛載指令 才會掛載
還可以指定 uid 或 gid 等等權限 限制哪些人才可以下掛載指令

1. https://help.ubuntu.com/community/Autom ... stem_table
<options>
noauto (do not mount when "mount -a" is given, e.g., at boot time), user (allow a user to mount), and owner (allow device owner to mount), and comment (e.g., for use by fstab-maintaining programs)
2. http://en.wikipedia.org/wiki/Fstab
auto / noauto
With the auto option, the device will be mounted automatically at bootup or when the mount -a command is issued. auto is the default option. If you do not want the device to be mounted automatically, use the noauto option in /etc/fstab. With noauto, the device can be only mounted explicitly.
这个自动挂载是桌面版的特性,就是不知道在哪里设置 server版是没有这种自动挂载的 就是不知道桌面上哪里可以设置......
Spades7
帖子: 7
注册时间: 2014-10-15 16:32
系统: ubuntu12.04

Re: Ubuntu12.04桌面版如何禁止U盘自动挂载?

#5

帖子 Spades7 » 2015-01-08 14:49

tang.zhe 写了::em04
你这个只是解决掉不让它自动播放,但还是挂载了,我是想拒绝挂载,
Spades7
帖子: 7
注册时间: 2014-10-15 16:32
系统: ubuntu12.04

Re: Ubuntu12.04桌面版如何禁止U盘自动挂载?

#6

帖子 Spades7 » 2015-01-08 15:15

问题解决了
http://blog.csdn.net/fgh1987168/article/details/6796955
这个贴子里的第二种方法,唉 被我忽略了
麻烦各位了
回复