增加samba用户提示Failed to add entry for user

[root@ubuntu ~]# smbpasswd -a test
New SMB password:
Retype new SMB password:
Failed to add entry for user test.


解决办法:
这是因为没有加相应的系统账号,所以会提示Failed to add entry for user的错误,只需增加相应的系统账号test就可以了:
[root@ubuntu ~]# groupadd test -g 6000
[root@ubuntu ~]# useradd test -u 6000 -g 6000 -s /sbin/nologin -d /dev/null


这时就可以用smbpasswd -a test增加test这个samba账号了!

[root@ubuntu ~]# smbpasswd -a test
New SMB password:
Retype new SMB password:
Added user test.

Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐