Author Topic: [SOLVED] Fdisk use as User  (Read 676 times)

Offline Was_Just19

  • Hero Member
  • *****
  • Posts: 6852
  • MLU
[SOLVED] Fdisk use as User
« on: July 24, 2010, 07:39:39 AM »
Some time ago I recall that fdisk could be used with user permissions to list details of those drives the user had control of .......  such as USB attached storage media. I think I may have been using a 2.6.22 or somewhere close at the time.

I am not sure also if it may have been some user group settings that allowed this behaviour ---  which I find very desirable ----  as that install has been wiped since.

The behaviour as I remember it was
as user fdisk -l displayed
all removable disks including flash sticks

as root it displayed
all disks attached to the system, including internal HDDs.

Can anyone enlighten me about the above?

Is there an easy way to set up a user account so that fdisk will allow the user to work on removable media while preventing the user from full access to all drives?

Thanks in advance     ;)
« Last Edit: July 24, 2010, 09:11:37 AM by JohnBoy »

Offline Was_Just19

  • Hero Member
  • *****
  • Posts: 6852
  • MLU
Re: Fdisk use as User
« Reply #1 on: July 24, 2010, 08:22:07 AM »
Using a trial and error method it seems that making a user a member of the

floppy  group

enables that user to use fdisk and get a report on the removable media drives attached to the system, including flash sticks.

I would suggest that this might be considered as the default setting for future releases and updates.
It allows the user to manage his/her media without having to know or access root privileges ..... surely a desirable situation?

If I manage to get any further info I will post again.
I have yet to determine if such a user can use fdisk to write to the media, but I expect it may be so.

EDIT
           Yes I can confirm that I can manipulate the partition table of a flash disk with fdisk after setting any user to be a member of the 'floppy' group.

I guess I have answered my own question here and can mark this thread as Solved.   :D

It does raise another question though for which I will start a new thread.


regards.
« Last Edit: July 24, 2010, 09:12:16 AM by JohnBoy »