samba 服务使用

1, samba是什么?

类似的windows共享的软件,比ftp的有点是可远程修改文件


2,如何实现?

apt-get install samba

mkdir /samba/

mkdir /samba/share

mkdir /samba/user1

groupadd user

useradd  -g user user1

useradd user2

usermod  -G user user2

注意:

share目录下:chmod 777 share

user1目录下: chown use1 user1 ; chgrp user user1


vi /etc/samba/smb.conf

[global]
    workgroup = WORKGROUP
    netbios name = ubuntu14
    server string = samba server

    security = user
    map to guest = Bad User
    passdb backend = tdbsam

   log file = /var/log/samba/log.%m
    max log size = 1000

#======================= Share Definitions =======================
[share]
    comment = share
    path = /samba/share
    available = yes
    browseable = yes
    public = yes
    writeable = yes

[user1]
    comment = user1 file
    path = /samba/user1
    available = yes
    browseable = yes
    writeable = yes
    write list = user1

touch /etc/samba/smbpasswd

smbpasswd -a user1

输入密码

没有这一步,会出现session setup failed: NT_STATUS_LOGON_FAILURE错误。


测试连通性

smbclient -L//127.0.0.1

smbclient -L//127.0.0.1/share

windows下:

\\192.168.51.160

结果:







参考:

http://www.cnblogs.com/phinecos/archive/2009/06/06/1497717.html

http://www.cnblogs.com/xd502djj/archive/2011/11/23/2260094.html

http://vbird.dic.ksu.edu.tw/linux_server/0370samba.php

http://bbs.chinaunix.net/forum.php?mod=viewthread&tid=1436507&highlight=

http://blog.csdn.net/chen_jp/article/details/7866625

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值