fdisk -lu /dev/hda | grep NTFS

Paul Howarth paul at city-fan.org
Wed Apr 19 16:38:20 UTC 2006

Kenneth Porter wrote:
> On Saturday, April 15, 2006 10:26 AM +0800 Ed Greshko 
> <Ed.Greshko at greshko.com> wrote:
>> and try again as root.  fdisk is in /sbin and not part of your normal
>> PATH.  Also, you will need to be root to open /dev/hda anyway.
> One of the first things I do on a Fedora system is to change the 
> path-setting logic in /etc/profile.d to grant the sbin directories to 
> normal users. I shouldn't need to be root to query many system settings, 
> and being root all the time for the convenience of reading system 
> settings can be dangerous.
> You don't need to be root to access raw disk devices; you can also be in 
> the disk group. The disk group is intended to be the group that runs 
> dump to backup disks, but you can also use it to run fdisk read-only to 
> query a disk's configuration. Use gpasswd to add a user to the disk group.

Doing that means that that user can then read the entire disk, and hence 
any file stored on that disk, completely bypassing file permissions.

One way of doing this would be to use "dd" to copy the part of the disk 
for the partition of interest into a file somewhere else and then 
loopback mount that file (they could do this on another system where 
they have the ability to do loopback mounts if they couldn't do it locally).


More information about the users mailing list