--centos安裝samba yum -y install samba samba-common samba-client --創建用戶 groupadd smb useradd -g smb smbuser pdbedit -a -u smbuser --創建目錄 mkdir /home/smb... ...
--centos安裝samba yum -y install samba samba-common samba-client --創建用戶 groupadd smb useradd -g smb smbuser pdbedit -a -u smbuser --創建目錄 mkdir /home/smbuser/smb chmod 777 /home/smbuser/smb --配置共用 vi /etc/samba/smb.conf 配置節 [smb] comment = user public directory path=/home/smbuser/smb browseable = yes writable = yes write list = smbuser --關閉SELinux vi /etc/selinux/config 配置節 SELINUX=disabled --重啟,配置生效 service smb restart service nmb restart --開機啟動 systemctl enable smb systemctl enable nmb --Windows掛載(電腦->映射網路驅動器) \\192.168.10.201\smb --centos 掛載 yum -y install cifs-utils mkdir /smb201 --臨時掛載,重啟後消失 mount -t cifs -o username=smbuser,password=123456, //192.168.10.201/smb/ /smb201 --開機掛載 chmod +x /etc/rc.local chmod +x /etc/rc.d/rc.local vi /etc/rc.local #mount -t cifs -o username=smbuser,password=123456, //192.168.10.201/smb/ /smb201 #exit 0