OK,可以在win客户端输入\\ip进行访问linux提供的共享目录了。
2012.2.23更新 编译安装
0. download source package
1. tar zxvf samba-3.6.3.tar.gz
2. cd samba-3.6.3/source3
3. ./configure --prefix=/usr/local/samba
4. make
5. make install
6. make installbin
7. make installman # ./configure;make;make install;make installbin;make installman
8. make revert # Note that if you are upgrading from a previous version of Samba the old versions of the binaries will be renamed with an “.old” extension.
9. cp /root/samba-3.6.3/packaging/RHEL/setup/smb.conf /usr/local/samba/lib/smb.conf
10. link files
ln -s /usr/local/samba/lib/libtalloc.so.1 /usr/lib/libtalloc.so.1
ln -s /usr/local/samba/lib/libtdb.so.1 /usr/lib/libtdb.so.1
ln -s /usr/local/samba/lib/libwbclient.so.0 /usr/lib/libwbclient.so.0
ln -s /usr/local/samba/lib/libtalloc.so.2 /usr/lib/libtalloc.so.2
11. config services
check the /etc/services file,make sure include
netbios-ssn 139/tcp
netbios-ns 137/udp
12. Starting smbd as a Daemon
/usr/local/samba/sbin/smbd -D
/usr/local/samba/sbin/winbindd -D
/usr/local/samba/sbin/nmbd -D
13. config start smbd with system up
vi /etc/rc.d/rc.local,add follow lines:
/usr/local/samba/sbin/smbd -D
/usr/local/samba/sbin/winbindd -D
/usr/local/samba/sbin/nmbd -D
14. add user
[root@localhost bin]# /usr/local/samba/bin/smbpasswd -a samuser
New SMB password:
Retype new SMB password:
Added user samuser.
15. config the share dir
vi /usr/local/samba/lib/smb.conf
16. check config
/usr/local/samba/bin/testparm