1. Install samba (centos5.5 ):
yum install samba system-config-samba samba-client samba-common
2. Create a www account
/usr/sbin/useradd wwwmkdir -p /data/wwwchmod 777 /data/wwwchown -R www:www /data/wwwcat /etc/passwd | mksmbpasswd.sh> /etc/samba/smbpasswd
3. Create a samba configuration file
Mv-f/etc/samba/smb. conf/etc/samba/smb. conf. bak
Vi/etc/samba/smb. conf
As follows:
[global]server string = Samba Serversecurity = userencrypt passwords = yessmb passwd file = /etc/samba/smbpasswd[web]workgroup = wwwnetbios name = wwwpath = /data/wwwbrowseable = yeswriteable = yes
4. Set a password for samba user www:
smbpasswd -a www
5. Start samba:
/sbin/service smb start
6. Test on a windows Client
\\192.168.8.32\web
In the pop-up Authentication Window, enter the user name www and password (check my password) to confirm.
7. Map the linux directory shared by samba to a drive letter of Windows:
Right-click my computer --> MAP network drive --> select an unused drive letter, enter \ 192.168.8.32 \ web in the folder, and check "Log on" to reconnect (after restarting the computer, the connection will be automatically connected), and then press enter --> enter the user name www and password (check my password) to confirm.