smb服务器下设置用户名和密码
一、修改 /etc/samba/smb.conf 配置文件
security=user
二、创建用户名及密码
1.创建系统用户及密码
[root@localhost ~]# useradd test1
[root@localhost ~]# passwd test1
更改用户 test1 的密码 。
新的 密码:
无效的密码: WAY 过短
无效的密码: 是回文
重新输入新的 密码:
passwd: 所有的身份验证令牌已经成功更新。
如果不创建系统用户会出现如下错误:
[root@localhost ~]# smbpasswd -a test1
New SMB password:
Retype new SMB password:
Failed to add entry for user test1.
2.创建smb用户及密码
[root@localhost ~]# smbpasswd -a test1
New SMB password:
Retype new SMB password:
Added user test1.