Method 11, install Samba: You can first check if it is installed: Rpm-qa | grep samba, without the words to install it yourself, here is an on-line installation mode based on RPM package Yum
Yum is a quick-install mode that automatically solves the dependencies of software installation and automatically downloads the appropriate software for installation on a specific server, with simple commands: Yum installs Samba, which is fast and easy behind the programmer's hard work!
2, create the shared folder, this is Mkdir-m 777/home/def/share
3, modify the/etc/samba/smb.conf, the parameters in this is more, mainly
Workgroup = Workgroup (this is the Windows Workgroup mode, and there is a domain mode)
Hosts allow = 192.168.1.100 (can put the IP address to ask, when the Windows address is written here)
Then at the end of the file, add
[Public] (share name, which is the name that will be displayed when Windows is accessed)
Comment = Public Stuff (note)
Path =/home/def/share (share name)
Public = yes (open)
writable = yes (writable)
Of course, here are just some of the basic parameters, as well as other parameters according to the situation settings, such as garbled, and also specify the encoding format.
4. Restart the SMB Service: Service SMB restart
5. Create a Samba customer: Smbpasswd-a def, enter the password after entering. This is the future remote host login required password, where the DEF account must be the system already
Account number, no words will error, and then the new password is a remote login password, the advantage of doing so is their password and remote login separate.
6, Windows connection, start running, enter \\192.168.1.200, enter the SMB account password can be 7. If Windows modify does not have permissions to ensure that Setlinux is turned off, you can do so with the Setenforce 0 command. By default, SELinux prohibits the network from writing to the shared directory on the Samba server, even if you allow this operation in smb.conf. /usr/bin/setenforce Modify SELinux Real-time operation mode Setenforce 1 set SELinux to become enforcing mode Setenforce 0 set SELinux to be permissive mode if you want to completely disable S Elinux need to set the parameter selinux=0 in/etc/sysconfig/selinux, or add this parameter in/etc/grub.conf/usr/bin/setstatus-v method two
1. Set up a shared directory on Windows
such as: Set D:\RedHat_disk to shared directory
2. Create a user on Windows, such as Tommy, password 111111
3. Add the Tommy user to the Access group in the shared directory D:\redhat_disk and set the Tommy
Full Control permission (read, write) for this shared directory
4. Install the Samba-client client under Linux
# yum Install Samba-client
5. Install the Cifs-utils package
# yum Install Cifs-utils
6. Create a mount point under Linux
# mkdir/mnt/windows
7. Mount the shared directory on Windows D:\redhat_disk to the/mnt/windows directory under Linux
# mount-t Cifs-o username=tommy//192.168.1.123/redhat_disk/mnt/windows
Enter password:111111
8, if the mount is successful, you can enter/mnt/windows, create a new file to see if Windows can see
9. In the/etc/fstab file, add the mount information of the shared directory
192.168.1.123/redhat_disk/mnt/windows CIFS username=tommy,password=111111 0 0
10. To this end, the shared directory on Windows//192.168.1.123/redhat_disk is successfully mounted on Linux, and after the Linux reboot, the directory is automatically mounted to the/mnt/windows directory.
Samba Shared Services