azure - 在 Azure 中重置域控制器的密码
问题描述
我正在尝试使用自定义脚本扩展来重置我的域控制器的密码。
net user 'username@domain.com' 'xX@123456'
在详细信息状态中,我看到以下内容 -
[
{
"code": "ComponentStatus/StdOut/succeeded",
"level": "Info",
"displayStatus": "Provisioning succeeded",
"message": ""
},
{
"code": "ComponentStatus/StdErr/succeeded",
"level": "Info",
"displayStatus": "Provisioning succeeded",
"message": "The syntax of this command is:\\n\\nNET USER\\n[username [password | *] [options]] [/DOMAIN]\\n username {password | *} /ADD [options] [/DOMAIN]\\n username [/DELETE] [/DOMAIN]\\n username [/TIMES:{times | ALL}]\\n username [/ACTIVE: {YES | NO}]\\n\\nThere is no such global user or group: username@domain.com.\\n\\nMore help is available by typing NET HELPMSG 3783.\\n\\nThere is no such global user or group: username@domain.com.\\n\\nMore help is available by typing NET HELPMSG 3783.\\n"
}
]
我不确定以下消息的含义 -
该命令的语法是:\n\nNET USER\n[用户名 [密码 | *] [options]] [/DOMAIN]\n 用户名 {密码 | *} /ADD [options] [/DOMAIN]\n 用户名 [/DELETE] [/DOMAIN]\n
用户名 [/TIMES:{times | ALL}]\n 用户名 [/ACTIVE: {YES | NO}]\n\n没有这样的全局用户或组:username@domain.com。\n\n通过键入 NET HELPMSG 3783 可以获得更多帮助。\n\n没有这样的全局用户或组:username@domain。 com。\n\n可通过键入 NET HELPMSG 3783 获得更多帮助。\n
解决方案
不是确切的解决方案,但是您可以在删除用户并再次将其添加到管理员组后使用以下解决方案。
首先,使用以下命令查看当前的 Local Admin 用户(属于 Local Administrators 组的用户):
=> 网络本地组管理员
检查要添加到本地管理员组的用户或组是否不存在,如果不是,请使用以下命令将域管理员添加到本地管理员组:
网络本地组管理员/添加“域\域管理员”| ei : net localgoup 管理员 /add "Microsoft\Domain Admins"
在域和管理员之间有一个空格,因此您必须添加符号“”(引用)
此外,您必须在 /add 之后而不是之前指定组或用户:)。
资料来源:技术网
推荐阅读
- php - WP_Query 无法在两个日期之间进行过滤
- r - 带有插入符号的 glmnet 返回“lognet 中的错误(x、is.sparse、ix、jx、y、权重、偏移量、alpha、nobs、:外部函数调用中的 NA/NaN/Inf(参数 5)”
- php - 如何以对象类型作为输出参数调用 Oracle 存储过程?(PLS-00306:调用中的参数数量或类型错误)
- ruby-on-rails - 无法提取 RVM 源
- amazon-web-services - AWS CLI 命令以表格/文本格式获取 AMI 的图像大小
- vba - 运行时错误 15 - 代码类型不匹配以更改 MS Access 数据库中的密码
- python - 循环比较列表中的数字和 XML 中的字段编号并打印属性名称
- r - 一个闪亮模块中的多个 tabItems
- excel - 循环记录“X”个指标的时间
- youtube - YouTube Studio 多个摄像机角度