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

RE: fdisk -l



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

 

From: redhat-sysadmin-list-bounces redhat com [mailto:redhat-sysadmin-list-bounces redhat com] On Behalf Of nitin gizare wipro com
Sent: Thursday, July 15, 2010 5:13 AM
To: redhat-sysadmin-list redhat com
Subject: fdisk -l

 

Hello

 

I have requirement of using fdisk –l command w/o root.

Please advice how we can do it ?.

 

Rgds

Nitin

 

 


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