![使用文件夹名称(域)验证用户身份](https://linux22.com/image/913635/%E4%BD%BF%E7%94%A8%E6%96%87%E4%BB%B6%E5%A4%B9%E5%90%8D%E7%A7%B0%EF%BC%88%E5%9F%9F%EF%BC%89%E9%AA%8C%E8%AF%81%E7%94%A8%E6%88%B7%E8%BA%AB%E4%BB%BD.png)
我忘记了 Ubuntu 的密码和登录名,现在想重置它。我使用装有 Ubuntu 18.04 的本地计算机。我找到了正确的方法(一些指南),在安全模式下使用以下命令:
passwd username
但是我的登录使用其中的域名:
MYDOMAIN\mikhail
我也可以使用目录ls
来检查它home
:
home
|- baseuser
|- MYDOMAIN
| - mikhail
| - anotheruser
这意味着我的主目录中有目录 MYDOMAIN,其中有一些用户。其中一个是我的:mikhail
。我尝试了这个命令:
passwd MYDOMAIN\mikhail
出现错误:
沒有此用戶。
我尝试了所有可能的情况:
passwd mikhail
passwd MYDOMAIN\\mikhail
passwd MYDOMAIN/mikhail
passwd MYDOMAIN//mikhail
passwd MYDOMAIN.mikhail
passwd MYDOMAIN@mikhail
怎样才能正确地写呢?
答案1
您的系统已设置活动域 (AD)。这意味着您需要在 Windows NT 服务器上重置密码。
你需要smb密码命令来改变它但是如果您被允许使用此方法则取决于域服务器(即 Windows NT)上的安全设置。
smbpasswd -U {USER} -r {IP_ADDRESS_DOMAIN_SERVER}
-r remote machine name
This option allows a user to specify what machine they wish to
change their password on. Without this parameter smbpasswd defaults
to the local host. The remote machine name is the NetBIOS name of
the SMB/CIFS server to contact to attempt the password change. This
name is resolved into an IP address using the standard name
resolution mechanism in all programs of the Samba suite. See the -R
name resolve order parameter for details on changing this resolving
mechanism.
The username whose password is changed is that of the current UNIX
logged on user. See the -U username parameter for details on
changing the password for a different username.
-U username
This option may only be used in conjunction with the -r option.
When changing a password on a remote machine it allows the user to
specify the user name on that machine whose password will be
changed. It is present to allow users who have different user names
on different systems to change these passwords.
如果您收到 NT_STATUS_ACCESS_DENIED,则需要询问您的 Windows 管理员。