1. See if Samba services are installed
# RPM –qa |grep Samba
2. if not installed, the security
# Yum Install Samba
Execute 4 times this command
3. View the installed Samba files
#rpm –qa |grep Samba
4. Change configuration file
# vim/etc/samba/smb.conf
Attention:
A: do an anonymous interview with Sambaserver--changes such as the following:
a) security =share
b) path=/home/hsx---------- change path in [public]
Save and exit
c) create the Hsx folder under the Home folder and
#cd/Home
#mkdirhsx
#chmod777 HSX// change its permissions
d) restart Samba Services
#service SMB Start
e) view Sambaserver
#smbclient –L//192.168.1.111/public
f) log in to Sambaserver and upload and download
#smbclient//192.168.1.111/public
#get1. txt ( download 1.txt files to the root folder)
#putinstall. log ( upload install.log file to Hsx folder)
Note: When you want to upload or download a file or folder to a specified folder, you first need to go to the specified folder. In an SMB operation
B: do a login with user authentication visit Sambaserver--changes such as the following:
The others are the same as the first, and the differences are as follows:
1) in the file Security=user
2) Create user U1 and set password
#useraddu1
3) Add the user to the SMBserver, associate
#smbpasswd –a U1
4) Restart the service
#servicesmb restart
5) View Sambaserver
#smbclient –L//192.168.1.111/u1–U U1
6) log in to Sambaserver and upload and download
#smbclient//192.168.1.111/u1 –U U1
#get1. txt ( download 1.txt files to the root folder)
#putinstall. log ( upload install.log file to Hsx folder)
The configuration of Samba server in Linux