fdisk -l

nitin.gizare at wipro.com nitin.gizare at wipro.com
Thu Jul 15 14:58:45 UTC 2010


Thanks this helps...

 

Rgds

Nitin

 

 

________________________________

From: redhat-sysadmin-list-bounces at redhat.com
[mailto:redhat-sysadmin-list-bounces at redhat.com] On Behalf Of Ben Kevan
Sent: Thursday, July 15, 2010 7:54 PM
To: redhat-sysadmin-list at redhat.com
Subject: Re: fdisk -l

 

On Thu, Jul 15, 2010 at 7:06 AM, Olt, Joseph <jolt at 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 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/redhat-sysadmin-list/attachments/20100715/bd413566/attachment.htm>


More information about the redhat-sysadmin-list mailing list