阿里云搭建samba服务器

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/wowocpp/article/details/86406129

118.190.215.49
sudo yum install samba
sudo vi /etc/samba/smb.conf

[share]
   comment = Share
   path = /home/sam/share
   available = yes
   browseable = yes
   public = no
   writable = yes

11

[jack@ etc]$ sudo vi /etc/samba/smb.conf
[jack@ etc]$ sudo smbpasswd -a jack
New SMB password:
Retype new SMB password:
Added user jack.

在这里插入图片描述

输入"sudo service smbd restart"重启samba服务
在这里插入图片描述

二、samba安装&配置
1、安装
rpm -qa | grep samba
yum install samba
chkconfig smb on

2、配置
cp /etc/samba/smb.conf /etc/samba/smb.confbak
vi /etc/samba/smb.conf
[global]
diplay charset = gbk
unix charset = gbk
dos charset = gbk
workgroup = work
netbios name = work
server string = uc
security = user

[darwin]
comment = uc
path=/home/work/
create mask = 0664
directory mask = 0775
writeable = yes
valid users = work
browseable = yes

#添加用户
smbpasswd -a work

3、启动

smbd -D
#查看进程是否启动
ps auxf | grep smbd
netstat –npl 查看samba端口号,默认会使用139、445两个端口号

4、本地测试
smbclient -L 127.0.0.1 -U work

mac:
command +k ; smb://ip_address

windows:
运行输入:\Samba服务器的ip

【参考】
http://www.cnblogs.com/suihui/p/4334224.html
http://www.cnblogs.com/kreo/p/4368811.html

https://blog.csdn.net/coder_ai/article/details/51531521

猜你喜欢

转载自blog.csdn.net/wowocpp/article/details/86406129
今日推荐