samba

mac/window怎么访问linux?(我用得是mac)

步骤:

1.安装samba(首先要保证mac到linux可以ping通) 

yum install samba samba-client samba-common

2.更改smb.conf,在最后加上[share]那一栏,path所指的目录是自己创建的用于共享的文件夹share

  mkdir share

  chmod 777 share

添加samba账户
useradd yin 创建yin这个账户
passwd yin  设置密码
sudo touch /etc/samba/smbpasswd sudo smbpasswd -a yin
vi /etc/samba/smb.conf

3.

systemctl enable smb.service
systemctl enable nmb.service
sytemctl restart smb.service
systemctl restart smb.service

4.查看smb.service

systemctl status smb.service

如果显示正常就OK,如果不正常可能是防火墙的问题

systemctl stop firewalld.service
setenforce 0
systemctl restart smb.service
systemctl restart nmb.service

 

右键“Finder”,选择“连接服务器”,服务器地址写上smb://192.168.156.130(linux系统的ip地址),连接成功!

 

pdbedit -a username  添加一个用户
pdbedit -L username 查看samba用户
pdbedit -X username 删除一个用户
posted @ 2017-07-12 19:56  Emyin  阅读(201)  评论(0编辑  收藏  举报