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=