20.3. Repartitioning 잠금
polkit 을 사용하면 개별 작업에 대한 권한을 설정할 수 있습니다. 디스크 관리 서비스의 유틸리티인 udisks2 의 경우 이 구성은 /usr/share/polkit-1/actions/org.freedesktop.udisks2.policy 에 있습니다. 이 파일에는 일련의 작업과 기본값이 포함되어 있으며, 시스템 관리자가 재정의할 수 있습니다.
/etc에 저장된 polkit 설정은 /usr/share/ 에 있는 패키지가 제공하는 구성을 재정의합니다.
절차
/usr/share/polkit-1/actions/org.freedesktop.udisks2.policy에서와 동일한 내용을 사용하여 파일을 만듭니다.cp /usr/share/polkit-1/actions/org.freedesktop.udisks2.policy /etc/share/polkit-1/actions/org.freedesktop.udisks2.policy/usr/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사용자만 작업을 수행할 수 있도록 하려면auth_admin에서no를 바꿉니다.- 변경 사항을 저장합니다.
사용자가 디스크 설정을 변경하려고 하면 다음 메시지가 반환됩니다.
Authentication is required to modify the disks settings.