Generally, the Linux SAMBA service is installed and directly enters the/etc/samba directory.
Open smb. conf,
[Gloabal] contains some global options that affect all sharing. The main option to be modified is Security =. the default option is Security = user, that is, Username Authentication logon. You can also change it to share, verification is not required.
We have defined some shares, such as [home] and [public]. We can add one by ourselves.
[Test]
Comment = test share
Browseable = Yes
Writeable = Yes
Valid users = Tester
Path =/test/
Guest OK = No
Here, [test] is the shared name. IP Address/test is used for access, commnet is the annotation, valid users indicates a valid user, and path indicates a shared path, guest OK = No indicates that the guset user cannot access it, And writeable = Yes indicates that it is writable.
So what needs to be done next is to create a tester user. Samba users must first be system users. Therefore, first use useradd tester to add a system user, and then use smbpasswd-a tester to add a samba user, and set the password.
Then start the smb service and you can use it./etc/init. d/SMB restart
Note: It is not necessarily possible to write data in the sub-shared file after the write-ability is set. The premise is that the System user of tester must have the write permission on the/test path. For convenience, the root user is the best. If you want to log on as root, delete the root row in smbusers first, then smbpasswd-a root can set the root smb password.