Write directory title here
Samba service introduction
Samba
It is Linux
a Microsoft
software that allows the system to apply the network communication protocol, SMB
not Server Message Block
the abbreviation of , which is the server message block, which SMB
is mainly used Microsoft
as the network communication protocol of the system. Later, the communicationSamba
protocol was applied to the system to form the current software . Later, Microsoft renamed it to the public file system, and added many new functions, which made Samba more powerful.SMB
Linux
Samba
SMB
CIFS(Common Internet File System)
Internet
Samba
The biggest function is that it can be used Linux
for windows
direct file sharing and printing sharing with the system, Samba
it can be used windows
for Linux
file sharing between and, and it can also be used Linux
for Linux
resource sharing between and, because NFS
(network file system) can be well completed The data sharing betweenLinux
Linux
and , so Samba
is more Linux
used windows
in the data sharing between and .
When using samba
and windows
to share files, please make sure windows
that NetBIOS
(that is, the function of My Network Places) is turned on.
update software
sudo apt-get upgrade
sudo apt-get update
sudo apt-get dist-upgrade
install samba server
sudo apt-get install samba samba-common
Create a file path for sharing
The operation is similar TFTP
, nfs
etc., Samba
which can be set as the root directory, so that they can be accessedsudo mkdir /home/linuxidc/linuxidc.com/share
Setting permissions
sudo chmod 777 /home/linuxidc/linuxidc.com/share
Add the user password used by Samba, which Windows will use when accessing
sudo smbpasswd -a linuxidc ( linuxidc是我的用户名)
Configure the configuration file of samba.
sudo vim /etc/samba/smb.conf
Add the following at the end of the file:
[share]
comment = share folder
browseable = yes
path = /home/linuxidc/linuxidc.com/share #这里配置共享目录
create mask = 0700
directory mask = 0700
valid users = linuxidc
force user = linuxidc
force group = linuxidc
public = yes
available = yes
writable = yes
Restart the Samba server
sudo service smbd restart
Access under Windows
Win+R
: Enter in the pop-up running window \ip
( ubuntu
use ifconfig
view in ip
) to access.