第十一章 FreeBSD 11 之设置samba为独立服务器

一、安装samba

# pkg search samba
 
p5-Samba-LDAP-0.05_2           Manage a Samba PDC with an LDAP Backend
p5-Samba-SIDhelper-0.0.0_3     Create SIDs based on G/UIDs
samba-nsupdate-9.16.5          nsupdate utility with the GSS-TSIG support
samba410-4.10.18               Free SMB/CIFS and AD/DC server and client for Unix
samba411-4.11.13               Free SMB/CIFS and AD/DC server and client for Unix
samba412-4.12.7                Free SMB/CIFS and AD/DC server and client for Unix
samba413-4.13.0                Free SMB/CIFS and AD/DC server and client for Unix
# pkg install samba413-4.13.0

二、启动samba

(1)打开/etc/rc.conf

# vi /etc/rc.conf

(2)在/etc/rc.conf最后加入如下,并保存:

nmbd_enable="YES"
winbindd_enable="YES"
samba_enable="YES"
samba_server_enable="YES"

(3)创建/usr/local/etc/smb4.conf,添加如下内容并保存

#vi /usr/local/etc/smb4.conf

[root]
    comment = root's stuff
    path = /root
    public = no
    browseable = yes
    writable = yes
    printable = no
    create mask = 0755

(4)创建samba root用户:

# smbpasswd -a root

(5)进入/usr/local/etc

# cd /usr/local/etc

(6)启动samba服务

# service samba_server start //启动命令

或者

# service samba_server restart //重启命令

(7)查看samba状态:

service samba_server status

(8)在windows下利用\\192.168.253.128访问共享文件夹

\\192.168.253.128

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值