You must add a user name before setting the password. In fact, SMB can use the user name list. What is specific? It is not very clear, that is, the SMB server can set account ing, that is, SMB users can not be system users in SMB. you can enable user account ing in the conf file by enabling SMB first. in the conf file, find username map =/etc/samba/smbusers and remove the semicolon. Remember the path after username map = and manually edit the file using the command: VI/etc/samba/smbusers this command is used to edit the file specified by username map and add a virtual user name in this file. For example, root administrator admin here means that the root user name has two virtual SMB username, one is administrator, and the other is admin. Add a new user name using this method. For example, add a system USER command in the system: useradd Username: Add a system user account, the account name is username. You can change the account name and add a virtual account to the/etc/samba/smbusers file. For example, username abc aaa aab username is the system account name ABC, AAA and AAB are virtual accounts of SMB. You can add all the users in your company to this file and then add them to your smb. create a shared directory in the conf file, for example, [TMP] Path =/tmp public = no valid users = username save and exit restart smb service SMB restart. If you do not need a virtual account, you must first create a system account: useradd username smbpasswd-a username set password restart SMB Server Service SMB restart