将root用户添加到samba用户当中
[root@localhost ~]# smbpasswd -a root
修改samba配置文件
[root@localhost ~]# vi /etc/samba/smb.conf
在文件末尾加入如下代码
[source]
comment = Share Directories
browseable = yes
writable = yes
path = /source 注意:(共享的目录最好在系统根目录开始建立目录文件)
public = yes
security = share
valid users = root
valid users = MYDOMAIN\%S
4、保存退出
5,重启samba服务
[root@localhost ~]# service smb restart
6,检查是否设置成功
[root@localhost ~]# smbclient //localhost/source -U root
Password:
Domain=[LOCALHOST] OS=[Unix] Server=[Samba 3.0.33-3.28.el5]
smb: \> ls
. D 0 Fri Feb 18 13:46:51 2011
.. D 0 Fri Feb 18 10:16:26 2011
linux-2.6.32.2.tar.bz2 A 64379321 Tue Feb 15 16:09:12 2011
jre-6u24-linux-i586-rpm.bin 20888537 Fri Feb 18 13:30:08 2011
JLink_Linux_V422.tgz A 1851128 Tue Feb 15 19:31:03 2011
eclipse-linuxtools-helios-SR1-incubation-linux-gtk.tar.gz A 127307596 Tue Feb 15 18:31:50 2011
37445 blocks of size 524288. 27021 blocks available
smb: \> q
出现类似上面内容表明设置成功,并且已经登录到samba服务器
5
7,在windowdows下的命令运行栏输入IP地址,
\\192.168.224.128(我的linux主机IP地址)