Vmware install samba

What is samba
What is samba? Can you do?

samba is based on the SMB protocol (ServerMessage Block, block information services) open source software, samba may be trademarks of the SMB protocol. SMB is a Linux, UNIX system can be used on a protocol to share files and resources such as printers, this protocol is based on Client \ Server type of agreement, Client terminal can access shared resources on the (server) Server via SMB. When Windows is Client, Linux server, Samba can be achieved through access to Linux resources window, to achieve data exchange between the two systems.
Linux for development is a very good system, but not as good as human-friendly windows, I usually sourceinsight edit the code on the windows, and then compile and run on the Linux side, and often need to audio and video from the end of each copy of Linux and windows , this time Samba becomes very convenient.
samba how to install
the system I use Linux, install the software in general use yum (called the Yellow dog Updater, Modified) package manager, yum RPM-based package management, can automatically download the RPM packages from the specified server and installed automatically handles dependencies sexual relations, and the first installation of all packages depending, again and again without the cumbersome download and installation.

Switch to run the install command root

The first way: yum install

yum is a set and find, install, update, and delete Linux software programs. It runs on RPM package is compatible with Linux distributions, such as: RedHat, Fedora, SUSE, CentOS, Mandriva.

Description: -y mean, all questions during installation are filled "yes"  
* expansion : the other command yum

 

vim /etc/samba/smb.conf configure

 

# 1 global section parameters:.
[, Ltd. Free Join]
# associated with the hostname set
workgroup = zkhouse <== workgroup name
netbios name = zkserver <== host name, hostname with not a concept, in the same group, netbios name must be unique
serverstring = this is a test samba server <== descriptive text, content irrelevant
# login-related settings file
storage file log file = /var/log/samba/log.%m <== log file name,% m represents the client-side Internet host name is the hostname
max log size = 50 <== maximum size of the log file is 50Kb
# associated with password
security = share <== indicates that no password can be set value share, user and Server
passdb backend = tdbsam
# printer loading
load printer = no <== not load the printer
------------------------- ----------------------------------
# 2 shared set of resources: the old commented, adding new the
# canceled before [homes], [printers] project, add [temp] items are as follows
[temp] <== shared resource name
comment = Temporary file space <== simple explanation, the content does not matter
path = / tmp <== actual shared directory
writable = yes <== a writable
browseable = yes <== can be user to browse all resources name,
the Guest the ok = yes <== allows users to freely log in

 

After editing and saving good, and then run the following command to reload smb.conf, and restart samba

service smb reload
Reloading smb.conf file: [ OK ]

[root@localhost heijunma]#service smb restart
Shutting down SMB services: [ OK ]
Starting SMB services: [ OK ]

[root@localhost heijunma]#service nmb restart
Shutting down NMB services: [ OK ]
Starting NMB services: [ OK ]

 


Then turn off the firewall SElinux, this close and then restart the Linux opens

[root@localhost heijunma]#service iptables stop
[root@localhost heijunma]#setenforce 0

 

The reason is because Linux user password and user password is not a samba completely different things, just samba users must be Linux users, so you need to add this account to heijunma samba user database, execute the following command:

[root@localhost heijunma]#smbpasswd -a lizhihai
New SMB password:
Retype new SMB password:
Added user lizhihai.

配置密码后再去连就能成功了。

好啦可以开始下一步学习了


参考:https://blog.csdn.net/weixin_40806910/article/details/81917077

Guess you like

Origin www.cnblogs.com/life-Meer/p/10960148.html