Samba 无法添加用户条目,我该如何解决?

Bis*_*Das 22 samba

我正在配置 Samba 并尝试添加域用户,但它返回以下内容:

failed to add entry for the user student
Run Code Online (Sandbox Code Playgroud)

这些是我到目前为止所做的命令:

frigate@frigate-desktop:~$ su 
Password: 
root@frigate-desktop:/home/frigate# nano /etc/samba/smb.conf 
root@frigate-desktop:/home/frigate# groupadd -g 201 machines
root@frigate-desktop:/home/frigate# mkdir -m 0775 /home/ntlogon
root@frigate-desktop:/home/frigate# mkdir /home/samba /home/samba/profiles
root@frigate-desktop:/home/frigate# chmod 1755 /home/samba/profiles/
root@frigate-desktop:/home/frigate# useradd -m test
root@frigate-desktop:/home/frigate# passwd test
Enter new UNIX password: 
Retype new UNIX password: 
passwd: password updated successfully
root@frigate-desktop:/home/frigate# smbpasswd -a test
New SMB password:
Retype new SMB password:
Added user test.
root@frigate-desktop:/home/frigate# smbpasswd -a root
New SMB password:
Retype new SMB password:
Added user root.
root@frigate-desktop:/home/frigate# smbpasswd -a student
New SMB password:
Retype new SMB password:
Failed to add entry for user student.
root@frigate-desktop:/home/frigate# smbpasswd -a student
New SMB password:
Retype new SMB password:
Failed to add entry for user student.
root@frigate-desktop:/home/frigate# smbpasswd -a stu
New SMB password:
Retype new SMB password:
Mismatch - password unchanged.
Unable to get new password.
root@frigate-desktop:/home/frigate# smbpasswd -a stu
New SMB password:
Retype new SMB password:
Failed to add entry for user stu.
Run Code Online (Sandbox Code Playgroud)

如何将此用户添加到 Samba?

mms*_*ick 54

在创建名为 student 的 samba 用户之前,您需要创建一个名为 student 的 UNIX 用户。

  • 以及如何做到这一点?答案是不完整的。 (2认同)

Phi*_*oud 6

也许你还没有创建它。所以第一次添加到samba需要添加

-a
Run Code Online (Sandbox Code Playgroud)

选项

sudo smbpasswd -a test
Run Code Online (Sandbox Code Playgroud)

samba 用户的设置和添加方式与 unix 用户不同。这意味着不是因为存在 unix 用户而是存在 samba 用户。添加 samba 用户的方法是从 unix 用户设置其密码

  • 这实际上对我有帮助。在某些情况下,Unix 用户可能存在但仍然会导致错误。谢谢。 (2认同)