9.5. パーティション再構成の無効化
ディスク管理を制御するデフォルトのシステム設定をオーバーライドできます。
/usr/share/polkit-1/actions/org.freedesktop.udisks2.policy
ファイルを直接変更しないでください。加えた変更は、次回のパッケージ更新時に置き換えられます。
前提条件
- 管理アクセスがある。
手順
/usr/share/polkit-1/actions/org.freedesktop.udisks2.policy
ファイルを/etc/share/polkit-1/actions/
ディレクトリーにコピーします。# cp /usr/share/polkit-1/actions/org.freedesktop.udisks2.policy /etc/share/polkit-1/actions/org.freedesktop.udisks2.policy
/etc/polkit-1/actions/org.freedesktop.udisks2.policy
ファイルで、不要なアクションを削除し、次の行を追加します。<action id="org.freedesktop.udisks2.modify-device"> <message>Authentication is required to modify the disks settings</message> <defaults> <allow_any>no</allow_any> <allow_inactive>no</allow_inactive> <allow_active>yes</allow_active> </defaults> </action>
アクセスを root ユーザーのみに制限する場合は、
<allow_any>no</allow_any>
を<allow_any>auth_admin</allow_any>
に置き換えます。