Add a samba user and set the password-Linux Enterprise Application-Linux server application. For more information, see. 5.3.3 Add a samba user and set the password;
The method we use is to add users first, but these users are all virtual users, because these users cannot log on to the system through SHELL; in addition, it is worth noting that the password of the System user is different from that of the Samba user. If you have set a system user to be able to log on to the SHELL, you can set the Samba password of the user to be different from the password of the System user to log on through the SHELL.
We use smbpasswd to add Samba users and Set passwords. The principle is to read the username in the/etc/passwd file.
[Root @ localhost sir01] # smbpasswd-a linuxsir
New SMB password: add the password of Samba user linuxsir here;
Retype new SMB password: Note: Enter it again;
Use the same method to add passwords for sir01, sir02, sir03, and sir04;
5.3.4 configure the permissions and ownership of related directories;
5.4 modify the Samba configuration file smb. conf;
The configuration file is as follows. After modifying/etc/samba/smb. conf, do not forget to restart the smbd and nmbd servers;
[Global]
Workgroup = LINUXSIR
Netbios name = LinuxSir
Server string = Linux Samba Test Server
Security = share
[Linuxsir]
Comment = linuxsiradmin
Path =/opt/linuxsir/
Create mask = 0664
# Create mask is the permission mask used to create files. It is readable and writable to users, readable to user groups, and readable to other users;
Directory mask = 0775
# Directory mask is used to set the permission mask when a user creates a directory, which means that the user and user group can be read and written, and other users can be read and executed;
Writeable = yes
Valid users = linuxsir
Browseable = yes
[Sirshare]
Path =/opt/linuxsir/sirshare
Writeable = yes
Browseable = yes
Guest OK = yes
[Sirallrw]
Path =/opt/linuxsir/sirallrw
Writeable = yes
Browseable = yes
Guest OK = yes
[Sir01_rw]
Comment = sir01_rw
Path =/opt/linuxsir/sir01_rw
Create mask = 0664
Directory mask = 0775
Writeable = yes
Valid users = linuxsir, @ sir0104
# @ Sir0104 is a user group;
Browseable = yes
[Sir01]
Comment = sir01
Path =/opt/linuxsir/sir01
Create mask = 0664
Directory mask = 0775
Writeable = yes
Valid users = sir01, @ linuxsir
Browseable = yes
[Sir02]
Comment = sir02
Path =/opt/linuxsir/sir02
Create mask = 0664
Directory mask = 0775
Writeable = yes
Valid users = sir02, @ linuxsir
Browseable = yes
[Sir03]
Comment = sir03
Path =/opt/linuxsir/sir03
Create mask = 0664
Directory mask = 0775
Writeable = yes
Valid users = sir03, @ linuxsir
Browseable = yes
[Sir04]
Comment = sir04
Path =/opt/linuxsir/sir04
Create mask = 0664
Directory mask = 0775
Writeable = yes
Valid users = sir04, @ linuxsir
Browseable = yes
5.5 client access;
5.5.1 Windows access;
Open Windows's IE browser and access it with an IP address. The format is similar to \ 192.168.1.3. You can also use the shared folder locally. For example, if the sir01 folder is mounted locally, it should be mounted as a sir01 user.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service