Test on the samba server first.
Smbclient-L // 127.0.0.1-U username press ENTER
Enter the password:
[Root @ Gthink ~] # Smbclient-L // 127.0.0.1
Password:
Anonymous login successful
Domain = [GHOME] OS = [Unix] Server = [Samba 3.0.28-1. el5_2.1]
Sharename Type Comment
--------------------
Homes Disk Home directories
Public Disk the user groups work directory
Temp Disk Temporary file space
IPC $ IPC Service (This is Linux files server)
Anonymous login successful
Domain = [GHOME] OS = [Unix] Server = [Samba 3.0.28-1. el5_2.1]
Server Comment
----------------
GCOMPUTER
SAMBA This is Linux files server
Workgroup Master
----------------
GHOME SAMBA
If the test is successful on the samba server, the local machine prompts that the path cannot be found or that no access is permitted.
Check whether the firewall on the server is configured and the relevant port passes.
Iptables-a input-p tcp-I eth0-s 192.168.1.0/24 -- dport 139-j ACCEPT (do not know whether to add port 445)
Iptables-a input-p udp-I eth0-s 192.168.1.0/24 -- dport 137: 138-j ACCEPT
If not, shut down the firewall on the local machine and try again. (I just got stuck here. After a long time, I finally set zonealarm to allow relevant ports for normal use ).
There is also a command for selinux, but it has not been tested.
Setsebool-P smbd_disable_trans 1
Enable the following two lines in smb. conf (remove the; sign from the beginning of the line)
Setsebool-P samba_domain_controller on
After setsebool-P samba_enable_home_dirson takes effect, the home directory can be read and written normally.
If you want to set the/home/samba/temp directory to full sharing, you should write the input in the character state: chcon-t samba_cmd_t/home/samba/temp do not forget to set the/home/samba/temp directory attribute to 777 at the same time. It should be no different from other FC versions.