大网数据广告活动
服务器运维问答

How to unlock an SSD disk with hdparm?

· 52CE 我爱测

I have an SSD disk with password protection, but the password was lost long time ago... so I tried to erase the ATA security with the hdparm command. With "hdparm -I", the disk information looks interesting as below: root@ubuntu:…

问题原文

原帖链接 · user3016997 · CC BY-SA 4.0

I have an SSD disk with password protection, but the password was lost long time ago... so I tried to erase the ATA security with the hdparm command.

With "hdparm -I", the disk information looks interesting as below:

root@ubuntu:~# hdparm -I /dev/sda

/dev/sda:

ATA device, with non-removable media
    Model Number:       TX21B10400GE8001                        
    Serial Number:      FG002VTA
    Firmware Revision:  PRO6F515
    Transport:          Serial, ATA8-AST, SATA 1.0a, SATA II Extensions, SATA Rev 2.5, SATA Rev 2.6, SATA Rev 3.0
Standards:
...........................
Commands/features:
    Enabled Supported:
       *    SMART feature set
            Security Mode feature set
...........................
Security: 
    Master password revision code = 65534
        supported
    not enabled
        locked
    not frozen
    not expired: security count
        supported: enhanced erase
    2min for SECURITY ERASE UNIT. 2min for ENHANCED SECURITY ERASE UNIT. 
Logical Unit WWN Device Identifier: 50011731001636dc
    NAA     : 5
    IEEE OUI    : 001173
    Unique ID   : 1001636dc
Checksum: correct

As you can see, the disk is in the security locked state, and it doesn't support hdparm security mode feature.

When use the security unlock command on this disk, the results are as below:

root@ubuntu:~# hdparm --user-master u --security-unlock 123456 /dev/sda
security_password="123456"

/dev/sda:
 Issuing SECURITY_UNLOCK command, password="123456", user=user
SECURITY_UNLOCK: Input/output error

I'm wondering if there is any other way to unlock this SSD disk and remove the password?

已采纳解答

原帖链接 · Taylor · CC BY-SA 4.0

I was able to get this to work on my Western Digital WD20EURS. After piecing together tips from all over Google, I was able to get a master password, research the commands of hdparm, and use your example in your original question to resolve my issue. Maybe this will help you too.

First off, I found a list of master passwords for various brands of drives.

Here are two locations, (replaced with Web Archive versions to avoid link rot)

My method:

  • Used ESCAPE to cancel Bios HD password request.
  • Booted into CentOS7 CLI (previously installed yum install hdparm)
  • Command hdparm -I /dev/sda to check if drive was "locked" ( -I is capital i )
  • Command hdparm --user-master m --security-unlock PASS /dev/sda
    • m = using master password
    • PASS = for me, typing 'WDC' ten times, with a finishing 'W'
      • found this password in the links listed above
  • Command hdparm -I /dev/sda again ( -I is capital i ). This time the drive showed "not locked" (at which I hesitantly rejoiced)
  • Command hdparm --user-master m --security-disable PASS /dev/sda
    • This should disable the password on the hard drive and allow you to boot without needing a password next time.
  • Then I put the drive back into my Windows machine. I was able to see all the partitions in the drive, erase them, and use this new drive!

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2015-08-09)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。