1, install samba (centos5.5): yuminstallsambasystem-config-sambasamba-clientsamba-common2, create www account/usr/sbin/useraddwwwmkdir-p/data/wwwchmod777/data/wwwchown-Rwww:
1. install samba (centos 5.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.