파티션 재분할 끄기
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 파일 내용은 바꾸지 마십시오. 어차피 다음 패키지 업데이트시 바뀐 내용을 덮어씁니다.
-
policyconfig 요소에서 필요하지 않은 어떤 동작 요소든 삭제하시고 다음 줄을 /etc/polkit-1/actions/org.freedesktop.udisks2.policy 파일에 추가하십시오:
<action id="org.freedesktop.udisks2.modify-device"> <description>Modify the drive settings</description> <message>Authentication is required to modify drive settings</message> <defaults> <allow_any>no</allow_any> <allow_inactive>no</allow_inactive> <allow_active>yes</allow_active> </defaults> </action>루트 사용자만 해당 동작을 가능하게 하려면 no 대신 auth_admin 값으로 바꾸십시오.
바뀐 내용을 저장하십시오.
사용자가 디스크 설정을 바꾸려고 하면 드라이브 설정을 수정하려면 인증이 필요합니다와 같은 메시지가 나타납니다.