欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

ubuntu下搭建samba服务

程序员文章站 2022-05-11 17:26:31
...

1、安装samba依赖库

apt-get install libtalloc2

2、安装samba

apt-get install samba

3、更改配置

备份:cp   /etc/samba/smb.conf   /etc/samba/smb.conf.bak

修改: /etc/samba/smb.conf

[global]

force user = root
force group = root
create mask = 0664
directory mask = 0775
workgroup = WORKGROUP
security = user
map to guest = Bad User
[share]
path = /usr/local/project
available = yes
browseable = yes
public = yes
writeable = yes
guest ok = yes                                                                                                                                                                                                                    

4、设置访问密码

smbpasswd -a root             --root 用户

输入密码..........................

5、重启服务

service smbd restart


6、windows中访问共享目录

(1)、打开文件夹,打开顶部的 “映射网络驱动器”,选择驱动器S:

(2)、输入\\ip\share,第一次登陆需要输入用户名跟密码

 

相关标签: samba