Linux8.0下SAMBA的安裝及配置(-) 從光盤中找到與SAMBA相關的文件,執行 rpm –ivh samba-common-2.2.5-10 rpm –ivh samba-2.2.5-10 rpm –ivh samba-client-2.2.5-10 然後進入/etc/samba執行vi smb.conf 命令,文件編輯如下: [global] workgroup=cbAccess netbios name=Hello server string=Hello's Linux Server hosts allow=192.168.7. 192.168.1. 192.168.2. 127. printcap name=/etc/printcap load printers=yes printing=bsd guest account=dragon log file=/var/log/samba/%m.log max log size=50 security=user encrypt passWords=yes smb passwd file=/etc/samba/smbpasswd unix password sync=yes passwd program=/usr/bin/passwd %u passwd chat=*New*password*%n\n * Retype*new*password*%n\n passwd:all*authentication*tokens*updated*sUCcessfully* pam password change=yes obey pam restrictions=yes socket option=TCP_NODELAY SO_RECVBUF=8192 SO_SNDBUF=8192 interfaces=192.168.7.148/24 dns proxy=no [homes] comment=Hello's Home Directories browseable=no writable=yes valid users=%s [printers] comment=All Printers path=/var/spool/samba browseable=no guest ok=yes writable=no printable=yes [public] comment=Public Stuff path=/ browseable=yes guest ok=yes public=yes writable=yes printable=no write list=@staff [dragon] comment=Fred's Printer valid users=dragon path=/home/dragon printer=dragon_printer public=no writable=no printable=yes 配置完成後執行 chmod a+w / 使整個機器共享 cd /etc/rc.d/init.d ./smb restart 創建一個Linux的用戶, useradd dragon passwd dragon smbpasswd –a dragon 成批添加 cat /etc/passwd mksmbpasswd.sh >/etc/samba/smbpasswd /usr/sbin/smbd –D /usr/sbin/nmbd –D