操做環境:ide
兩臺虛擬機,一臺安裝samba服務,一臺安裝samba客戶端。this
-3d
yum install samba* -y //samba服務 192.168.80.100
yum install samba-client -y //samba客戶端192.168.80.101rest
vi /etc/samba/smb.conf [database] comment = this is test file path = /opt/database public = yes read only = yes writable = yes write list = jack create mask = 0644 directory mask = 0777
systemctl restart smb #重啓服務
smbclient -L //192.168.80.100 -U tom
yum install cifs-utils -ycode
[root@localhost ~]# mount -t cifs --verbose -o username=tom,password=123 //192.168.80.100/database /opt/aa mount.cifs kernel mount options: ip=192.168.80.100,unc=\\192.168.80.100\database,user=tom,pass=********
df -hT
blog若是在目錄裏面建立不了文件到80.100上面輸入
chmod 777 /opt/database 由於沒有權限這條命令是給這個目錄權限全開ip