#14 Add ability to specify non-ASCII security passwords

Mark K

For the ATA security feature, currently it isn't possible to specify passwords which contain non-ASCII characters.

To improve that, it would be good if hdparm could be told to read the (binary) password from a file, and/or allow the user to give binary passwords on the command line (in hexadecimal).


  • Mark K

    Mark K - 2012-05-25

    Patch to add ability to specify security password from file for hdparm 9.39

  • Mark K

    Mark K - 2012-05-25

    Attached is a patch to implement new security options, where hdparm can be told to read the password from a file. For example:
    hdparm --security-unlock-from-file filename /dev/sg1
    hdparm --security-set-pass-from-file filename /dev/sg1
    ... etc.

    hdparm will read the first 32 bytes from the specified file and use that as the password. If fewer than 32 bytes can be read, the remaining password bytes will be set to 0.

    The patch could definitely do with some tidying up, and I haven't tested it significantly. But hopefully this will be useful to anyone who needs to lock/unlock disks with non-printable/binary passwords.


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks