Disable automount on RHEL 6.1
Always when a USB stick or CD/DVD-ROM is inserted in the PC, RHEL 6.1 automounts this hardware.
How can I permanently disable automount that only the root user can mount these devices manually? |
edit /etc/fstab
add "noauto" and root only access see Code:
man mount RHEL 6.3 is current you might want to upgrade soon Code:
su - |
I have added to the /etc/fstab file the following lines:
Code:
/dev/sr0 /media auto ro,noauto,mount,exec 0 0 Now I have the problem that I cannot write to an USB stick in the root account even I specified rw in the fstab. |
the /media part is a bit off
you can not mount directly in media .There needs to be a folder " /dev/sr0 /media/CD.DVD.drive " " /dev/sdb1 /media/USB.drive " and make those two folders in /media "CD.DVD.drive" and "USB.drive" or whatever you want to call them |
@John VV Thanks for you help.
Just as reference for future questions about this problem. To permanently disable the automount in RHEL 6.1 that only root can mount/umount USB or CD-ROM/DVD-ROM devices, I have done the following: Code:
cd /media |
Use the following to disable USB sticks from auto-mounting:
Create the following file: /var/lib/polkit-1/localauthority/10-vendor.d/20-disk.pkla Insert info from the code box below. Code:
[Disable mount] |
All times are GMT -5. The time now is 10:33 AM. |