如何在 PowerShell 中使用 Windows odbcconf CONFIGSYSDSN 或 Set-OdbcDsn 存储加密的 dp{加密密码}

发布于 2025-01-14 15:58:38 字数 239 浏览 2 评论 0原文

当我通过 Windows“ODBC 数据源管理器”对话框窗口编辑 ODBC 数据源中的密码时,密码以加密方式存储在 Windows 注册表中,例如 encrypted-dp{encrypted-password}

当我使用 odbcconf CONFIGSYSDSN 编辑密码时,它以纯文本形式存储在注册表中。

有没有一种方法可以像 Windows ODBC 对话框窗口一样使用编程方式/脚本存储数据源密码?

When I edit a password in ODBC Data Source through a Windows "ODBC Data Source Administrator" dialog window, the password is stored in an encrypted manner like encrypted-dp{encrypted-password} in Windows registry.

When I edit the password using odbcconf CONFIGSYSDSN, it is stored as plain text in the registry.

Is there a way to store a data source password using programmatic way/script in the same way as the Windows ODBC dialog window does?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

甜尕妞 2025-01-21 15:58:38

在本例中,它是一个正在编辑数据源属性的外部库,加密不是 Windows 进程的一部分。

当通过数据源编辑窗口更改属性时,该库对密码进行加密 - 该窗口已经是来自该库的专有第三方窗口。

我们从供应商那里得到了公开的“加密”方法,因此我们在使用 PowerShell 时也可以自己加密密码。

In this case, it was an external library, which was editing data source properties, encryption wasn't made as a part of the Windows process.

This lib was encrypting the password when changing the properties over the Data Source edit window - which was already a proprietary 3rd party window, coming from the lib.

We got an exposed "encrypt" method from the vendor, so we can also encrypt the password ourselves when using PowerShell.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文