Saturday, March 24, 2012

Mount a file system without using a password on Debian Linux

I have got a hard disk with some files on an NTFS (New Technology File System). Microsoft Windows uses NTFS.

I use the commands below to eliminate the need for a user to type a password when mounting a file system. In Terminal, type:

cd /usr/share/polkit-1/actions/

cp org.freedesktop.udisks.policy org.freedesktop.udisks.policyBackUp

gedit org.freedesktop.udisks.policy

Here is a part of the original file:

  <action id="org.freedesktop.udisks.filesystem-mount-system-internal">
    <description>Mount a system-internal device</description>
    <description xml:lang="da">Montér en intern enhed</description>
    <description xml:lang="de">Eingebautes Gerät einhängen</description>
    <message>Authentication is required to mount the device</message>
    <message xml:lang="da">Autorisering er påkrævet for at montere et fil system</message>
    <message xml:lang="de">Zugriffsrechte werden benötigt um das Gerät einzuhängen</message>
    <defaults>
      <allow_any>yes</allow_any>
      <allow_inactive>yes</allow_inactive>
      <allow_active>auth_admin_keep</allow_active>
    </defaults>
  </action>
 
Here is the changed part of the file to eliminate the need of a password:

      <action id="org.freedesktop.udisks.filesystem-mount-system-internal">
    <description>Mount a system-internal device</description>
    <description xml:lang="da">Montér en intern enhed</description>
    <description xml:lang="de">Eingebautes Gerät einhängen</description>
    <message>Authentication is required to mount the device</message>
    <message xml:lang="da">Autorisering er påkrævet for at montere et fil system</message>
    <message xml:lang="de">Zugriffsrechte werden benötigt um das Gerät einzuhängen</message>
    <defaults>
      <allow_any>no</allow_any>
      <allow_inactive>no</allow_inactive>
      <allow_active>yes</allow_active>
    </defaults>
  </action>


For more information on file systems, see page 44 of the book:
Computer Forensics JumpStart 
By Michael G. Solomon, K Rudolph, Ed Tittel, Neil Broom, Diane Barrett

I got the idea of removing authentication by reading this page.

No comments:

RSS