[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: fdisk -l



On Thu, Jul 15, 2010 at 7:06 AM, Olt, Joseph <jolt ti com> wrote:

Nitin,

 

Sudo is the best answer.  If you really want fdisk to run for any user you can change the permissions:

 

Default permissions:

-bash-3.00$ /sbin/fdisk -l

-bash-3.00$ sudo /sbin/fdisk -l

 

Disk /dev/sda: 26.8 GB, 26843545600 bytes

255 heads, 63 sectors/track, 3263 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

 

   Device Boot      Start         End      Blocks   Id  System

/dev/sda1   *           1          16      128488+  83  Linux

/dev/sda2              17        1974    15727635   83  Linux

/dev/sda3            1975        2235     2096482+  82  Linux swap

/dev/sda4            2236        3263     8257410    5  Extended

/dev/sda5            2236        3263     8257378+  83  Linux

 

Alter permissions:

-bash-3.00$ sudo chmod 4755 /sbin/fdisk

-bash-3.00$ /sbin/fdisk -l

 

Disk /dev/sda: 26.8 GB, 26843545600 bytes

255 heads, 63 sectors/track, 3263 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

 

   Device Boot      Start         End      Blocks   Id  System

/dev/sda1   *           1          16      128488+  83  Linux

/dev/sda2              17        1974    15727635   83  Linux

/dev/sda3            1975        2235     2096482+  82  Linux swap

/dev/sda4            2236        3263     8257410    5  Extended

/dev/sda5            2236        3263     8257378+  83  Linux

 

Regards,

 

Joseph



Doing this is a major issue as it will allow the user to do more then just, fdisk -l, which was the primary requirement. 

I would recommend using sudo, and allow access to fdisk -l 

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]