我有一台装有雪豹的 MacBook,我已经几个月没有使用过,并且我有一些想要从中恢复的视频...我的问题是我忘记了为其设置的密码。我的问题是,有谁知道任何教程或者可以解释如何在单用户模式下使用 DSCL 获取密码哈希?我已经尝试过几种不同的东西,我在谷歌上搜索过,但我对 Mac 不太熟悉。
到目前为止,我已经尝试使用
dscl localhost -read /Search/Users/root | dscl localhost -read /Search/Users/root | grep 生成的UID |切-c15-
返回 GUID,但返回时出现路径不正确的错误。但是这个路径不是 GUID 最基本的路径吗?我之前也使用 bootcamp 将 Windows 放在上面,所以也许路径不正确,因为我启用了 Windows Bootcamp?
I have a macBook with snow leopard on it that I haven't used in a few months, and I have some videos that I want to recover from it... My problem is I forgot the password I set for it. My question is, does anyone know of any tutorials or can explain how to get the Password HASH using DSCL in single user mode? I've tried several different things that I've googled, and I'm just not familiar with macs as much.
So far, I've tried using
dscl localhost -read /Search/Users/root | grep GeneratedUID | cut -c15-
to return the GUID, but it's returning with an error that the path isn't correct.. but isn't this path the most basic path for the GUID? I previously put windows on it as well using bootcamp, so maybe the path isn't correct because I have windows bootcamp enabled?
发布评论
评论(1)
DirectoryService 不会在单用户模式下运行(或者如果是,它将在最小的本地模式下运行),因此正常的 dscl 命令并不总是有效。试试这个:
然后在 //var/db/shadow/hash 中查找由您的 generatedUID 命名的文件,它将包含哈希值(十六进制)。我认为自 v10.4 以来哈希格式没有发生变化,因此信息 此处和此处(大约向下一半)应该仍然相关。
DirectoryService won't be running in single-user mode (or if it is, it'll be in a minimal localonly mode), so normal
dscl
commands won't always work. Try this:Then go look in //var/db/shadow/hash for a file named by your GeneratedUID, and it'll have the hashes (in hex). I don't think the hash format has changed since v10.4, so the info here and here (about halfway down) should still be relevant.