In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces the relevant knowledge of "the configuration steps of the Samba server on the Linux system". In the operation of the actual case, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
Step one:
Go to the / etc/samba directory, back up the smb.conf, delete the file, and create a new one yourself. Enter the following
The code is as follows:
[global]
Workgroup = WORKGROUP
Netbios name = www.e2fsck.org # the key point here. This name had better be the same as the machine name, which should be used for remote access.
Server string = e2fsck is samba server
Security = share
Load printers = no # does not load the printer
Disable spoolss = yes # hide the printer
Cups options = raw # Printer Type
Unix charset = utf8
Dos charset = GBK
Display charset = utf8
Client lanman auth = yes
Client plaintext auth = yes
Hosts deny = 192.168.0.55 # prevent this IP from accessing SMB
[wujie]
Path = / var/wujie
Writeable = yes
Browseable = yes
Guest ok = yes
Briefly explain the above [global] global configuration, there must be. The first three lines show what is said. If security is share, it does not need an account password, and if it is user, it needs to be verified.
[wujie] this is the directory where the share is displayed on the client. Path is the path to the share. If guest ok is yes, no authentication is required.
Step 2:
Create a folder in the / var/ directory called wujie to be used as a shared folder
The code is as follows:
[root@localhost ~] # id nobody
Uid=99 (nobody) gid=99 (nobody) groups=99 (nobody)
[root@localhost] # chown-R nobody:nobody / var/wujie
OK, and then restart the SMB server service smb restart and service nmb start, a simple shared server without authentication.
Step 3: make a shared server that requires an account password
1. First use the command useradd wujie-s / sbin/nologin (the system sets up an account called wujie and cannot log in to the system)
two。 Then use the command smbpasswd-a wujie (use this command to add an account for SMB called wujie)
3. Chown wujie:wujie / var/wujie (give the wujie account permission to use the directory / var/wujie)
4. Then modify / etc/samba/smb.conf:
The code is as follows:
[global]
Workgroup = WORKGROUP / / is used to specify the NT domain name described on the network on your machine
Netbios name = www.e2fsck.org / / hostname, the address used for access, important
Server string = e2fsck is samba server
Guest account = wujie / / if you want to set up an account, fill in the user name again and add the account to / etc/passwd, otherwise use the default 'nobody'' as the account
Security = user
/ / this is the security level of the samba server. The default is the user level. Samba has a total of four security levels.
1. Share level, shared security level, users can log in without entering account number and password
2. User level, user security level, users need account number and password to log in
3. Server level, server security level. You can specify another samba server to complete the work of checking password.
4. Domain domain security level, you need to specify a server such as XP to verify the user's password
The code is as follows:
Unix charset = utf8
Dos charset = GBK
Display charset = utf8
Client lanman auth = yes
Client plaintext auth = yes
The code is as follows:
[wujie]
Path = / var/wujie
Writeable = yes
Browseable = yes
Guest ok = no / / users need a password, yes does not need a password (need to cooperate with the above security level)
Comment = wujie
Valid users = wujie / / accessible users
Public = no / / Anonymous users cannot see it
Create mask = 0777
The main thing is to change security to user guest ok to no.
5. Finally, service smb restart and service nmb start made a shared file server with command access.
6. If the firewall is turned on,
The code is as follows:
[root@s] # iptables-An INPUT-p tcp-dport 139-j ACCEPT
[root@s] # iptables-An INPUT-p tcp-dport 445-j ACCEPT
[root@s] # iptables-An INPUT-p udp-dport 137-j ACCEPT
[root@s] # iptables-An INPUT-p udp-dport 138j ACCEPT
[root@s] # iptables-An INPUT-I lo-j ACCEPT
This is the end of the content of "configuration steps of Samba server on Linux system". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
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.