Samba không thêm mục nhập người dùng, làm cách nào để khắc phục điều này?


15

Tôi đã cấu hình Samba và cố gắng thêm một người dùng tên miền, nhưng nó trả về điều này:

failed to add entry for the user student

Đây là những lệnh tôi đã thực hiện cho đến nay:

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.

Làm cách nào tôi có thể thêm người dùng này vào Samba?

Câu trả lời:


34

Bạn cần tạo một người dùng UNIX có tên là sinh viên trước khi bạn tạo một người dùng samba có tên là sinh viên.


1

Có thể bạn chưa tạo ra nó. Vì vậy, để thêm nó lần đầu tiên vào samba cần phải thêm

-a

Lựa chọn

sudo smbpasswd -a test
Khi sử dụng trang web của chúng tôi, bạn xác nhận rằng bạn đã đọc và hiểu Chính sách cookieChính sách bảo mật của chúng tôi.
Licensed under cc by-sa 3.0 with attribution required.