操做环境: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