In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
What is the configuration of the CentOS Samba server? in view of this problem, this article introduces the corresponding analysis and solution in detail, hoping to help more partners who want to solve this problem to find a more simple and easy way.
Just after learning how to install the CentOS Samba server, let's continue to learn how to configure the CentOS Samba server. It is hoped that through CentOS Samba, we can also make a CentOS host compatible with the Windows network, achieve the same function, and then give full play to the availability of CentOS hosts.
Configure CentOS Samba
Configure CentOS Samba according to your requirements by editing / etc/samba/smb.conf. Here, the principle of this article is to apply file sharing only to the intranet, and let the directory to be shared have sufficient read and write permissions.
[root@sample ~] # vi / etc/samba/smb.conf ← edits the configuration file of Samba
# = Global Settings = = [global] ← found this line (global setting label) Add the following line below this line: dos charset = GB2312 ← sets the text encoding of the Windows client to simplified Chinese GB2312 unix charset = GB2312 ← specifies that the encoding of the new file or directory on the CentOS server where the CentOS Samba is located is GB2312 display charset = GB2312 ← specifies the default text encoding of the page when using SWAT, a tool that controls Samba through a browser, directory mask = 0777 ← Properties of the new directory (the following 4 lines) force directory mode = 0777 directory security mask = 0777 force directory security mode = 0777 create mask = 0777 ← specify the properties of the new file (the following 4 lines) force create mode = 0777 security mask = 0777 force security mode = 0777
Workgroup = MYGROUP ← find this line and change the workgroup name to the workgroup name defined by the Windows network
Workgroup = WORKGROUP ← changes to this state. Take the default "WORKGROUP" of Windows XP as an example.
; hosts allow = 192.168.1. 192.168.2. 127. ← finds the line, removes the ";" at the beginning of the line, and establishes access restrictions
Hosts allow = 192.168.0. 127.The ← changes to this state. Specify the private network IP address and the local address, and only allow access in these two cases.
Then define the public shared directory by filling in the following lines at the end of the CentOS Samba configuration file:
[public] comment = Public Stuff path = / home/samba ← specifies the shared directory location public = yes writable = yes ← attributes that grant write permissions to the shared directory
Next, create a private directory that will be shared to the Windows network through Samba.
[root@sample ~] # mkdir / home/samba ← create a special directory for shared files [root@sample ~] # chown-R nobody. / home/samba ← sets the private directory to belong to nobody [root@sample ~] # chmod 777 / home/samba ← and sets the private directory property to 777
Before making a connection to the server, the user used to log in to the Samba needs to be set up in advance. Here we take the Samba standard Samba user database management tool "smbpasswd" in CentOS as an example to create user data for logging in to Samba. One thing to note here: the premise for creating a user with smbpasswd is that the user exists in the system user-- based on the system user, before the user's information in the Samba user database can be created.
[root@sample ~] # smbpasswd-a centospub ← adds the system user centospub (for example) to the Samba user database New SMB password: ← enter the password that the user uses to log in to Samba Retype new SMB password: ← reconfirm the password Added user centospub.
This completes the configuration of the CentOS Samba server. Then we will have more knowledge about CentOS Samba server. If you don't unlock it, you can follow the industry information channel for more related knowledge.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.