LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Hide other partition on redhat 5.5 ? (https://www.linuxquestions.org/questions/linux-newbie-8/hide-other-partition-on-redhat-5-5-a-867308/)

albc123 03-08-2011 05:35 PM

Hide other partition on redhat 5.5 ?
 
Hello !
i have a pc with multiple operating system : windows 7 (ntfs) , windows XP ( fat32) and redhat 5.5.I want to hide all windows partition on linux (i want to prevent all users including root to see or mount these partition). On other linux i have used in the past this method :

- i create /usr/share/hal/fdi/preprobe/95userpolicy , and put on this folder a file called 10ignore-disks.fdi :
<?xml version="1.0" encoding="UTF-8"?>
<deviceinfo version="0.2">
<device>
<match key="block.device" string="/dev/sda1">
<merge key="info.ignore" type="bool">true</merge>
</match>
</device>
<device>
<match key="block.device" string="/dev/sda2">
<merge key="info.ignore" type="bool">true</merge>
</match>
</device>
</deviceinfo>

where sda1 and sda2 are windows partition.And these drive are not visible by all users.But on redhat this file doesn't make any effect.

What can i do.there is another method in redhat ?
thank you !

pljvaldez 03-08-2011 05:47 PM

It may be that redhat 5.5 doesn't use hal anymore. I believe most distros have migrated to udev, so you may need to either create a new rule for udev or move this rule to a different location. Or maybe hal is there and it just needs some syntax tweaking...

chrism01 03-08-2011 08:00 PM

Can I just point out that you can't hide anything from root... that's the point of root. He can always:

1. undo anything you do
OR
2. use fdisk instead

PS HAL is in RHEL 5.5 http://wiki.centos.org/Manuals/ReleaseNotes/CentOS5.5

albc123 03-08-2011 08:54 PM

I have used this method on mandriva 10 and all the partition are hide on all users including root.

chrism01 03-09-2011 12:31 AM

It's only 'hidden' via that tool ie HAL in this case. As I said above, root can undo anything you do; that's why it's called root. He can also use another tool to check eg fdisk.......

albc123 03-09-2011 04:42 AM

ok but what can i do in redhat only to hide these partition ?

chrism01 03-09-2011 07:27 PM

You can hide them from normal users by not mounting them (/etc/fstab) and ensuring that fdisk (& similar tools) are only runnable by root.

albc123 03-10-2011 07:32 PM

i wan't to hide from all users and from root.I have make this on other linux , but i can't make on redhat.I clear entries on /etc/fstab but when i logon as root , on places all the partition are visible.I know that root can do anything , but i just want to hide them from root so when someone logon as root can't see them.


All times are GMT -5. The time now is 06:17 AM.