码迷,mamicode.com
首页 > 其他好文 > 详细

samba 搭建

时间:2017-07-04 13:16:57      阅读:150      评论:0      收藏:0      [点我收藏+]

标签:cap   tar   ace   host   mkdir   tca   cal   home   ant   

#useradd -M -s /sbin/nologin kvmshare

#mkdir /home/etl

#chown kvmshare:kvmshare /home/etl

将本地账号添加到 samba 密码 xxx

#smbpasswd -a kvmshare
New SMB password:
Retype new SMB password:
Added user kvmshare.

修改配置如下 /etc/samba/smb.conf

[global]
    server string = Samba Server Version %v
    interfaces = lo br*
    bind interfaces only = Yes
    security = USER
    log file = /var/log/samba/log.%m
    max log size = 50
    load printers = No
    printcap name = /dev/null
    idmap config * : backend = tdb
    hosts allow = 127. 172.18.
    printing = bsd
[kvm]
    comment = KVM User read write
    path = /home/etl
    public = yes
    writeable = yes
    valid users = kvmshare

#service smb start

#systemctl enable smb.service                                            加入开机自启samba服务
#service smb status                                                             开看samba服务是否启动
#ll /etc/systemd/system/multi-user.target.wants/                 查看samba服务是否正常加入自启
# pdbedit -L                      查看samba用户
 
使用 smbclient 连接测试:
# smbclient //localhost/kvm -U kvmshare
Enter kvmshare‘s password:
Domain=[WORKGROUP] OS=[Windows 6.1] Server=[Samba 4.2.10]
smb: \> ls
 
 
 

 

samba 搭建

标签:cap   tar   ace   host   mkdir   tca   cal   home   ant   

原文地址:http://www.cnblogs.com/tengfei520/p/7115855.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!