ÔõÑùÔÚLinuxÉÏÉèÖÃÎļþ¹²Ïí£¨ÈçSamba£©
ÔõÑùÔÚlinuxÉÏÉèÖÃÎļþ¹²Ïí£¨Èçsamba£©
Ò»¡¢¼ò½é
Îļþ¹²ÏíÊÇÔÚÍøÂçÖÐÆÕ±éʹÓõÄÒ»ÏЧ£¬ÓÃÓÚÔÚ²î±ð×°±¸Ö®¼ä¹²ÏíÎļþºÍÎļþ¼Ð¡£ÔÚLinuxÖУ¬ÎÒÃÇ¿ÉÒÔʹÓÃSambaÀ´ÊµÏÖÎļþ¹²Ïí¡£SambaÊÇÒ»¸ö¿ªÔ´µÄÈí¼þÌ×¼þ£¬ÔÊÐíLinuxϵͳÓëWindowsϵͳ֮¼ä¹²ÏíÎļþºÍ´òÓ¡»ú¡£±¾ÎĽ«ÏÈÈÝÔõÑùÔÚLinuxÉÏÉèÖÃSambaÎļþ¹²Ïí¡£
¶þ¡¢×°ÖÃSamba
ʹÓÃÒÔÏÂÏÂÁî×°ÖÃSambaÈí¼þ°ü£º
sudo apt-get install samba
µÇ¼ºó¸´ÖÆ
Èý¡¢½¨Éè¹²ÏíÎļþ¼Ð
Ê×ÏÈ£¬½¨ÉèÒ»¸öÓÃÓÚ¹²ÏíµÄÎļþ¼Ð¡£¿ÉÒÔÑ¡ÔñÈκεط½×÷Ϊ¹²ÏíÎļþ¼Ð£¬ÕâÀïÎÒÃÇÒÔ/home/share×÷ΪʾÀý£º
sudo mkdir /home/share
µÇ¼ºó¸´ÖÆ
ÔÙ½¨ÉèÒ»¸öÓÃÓÚSambaЧÀÍÆ÷µÄÉèÖÃÎļþ¡£Ê¹ÓÃÒÔÏÂÏÂÁÉèsmb.confÎļþ£¬²¢½«ÄÚÈÝÕ³Ìùµ½ÎļþÖУº
sudo nano /etc/samba/smb.conf
µÇ¼ºó¸´ÖÆ µÇ¼ºó¸´ÖÆ
[global] workgroup = WORKGROUP server string = Samba Server %v netbios name = ubuntu security = user map to guest = Bad User dns proxy = no # ¹²ÏíÎļþ¼ÐÉèÖà [share] comment = Share Folder path = /home/share browsable = yes guest ok = yes read only = no create mask = 0777 directory mask = 0777
µÇ¼ºó¸´ÖÆ
Õâ¸öÉèÖÃÎļþÊ×ÏÈÉèÖÃÁËSambaµÄÈ«¾ÖÑ¡ÏȻºó½ç˵ÁËÒ»¸öÃûΪ”share”µÄ¹²ÏíÎļþ¼Ð¡£
ËÄ¡¢ÉèÖÃÓû§
ʹÓÃÒÔÏÂÏÂÁÉèÒ»¸öеÄSambaÓû§£º
sudo smbpasswd -a username
µÇ¼ºó¸´ÖÆ
½«”username”Ì滻ΪҪ½¨ÉèµÄÓû§Ãû£¬²¢ÉèÖÃÃÜÂë¡£
½ÓÏÂÀ´£¬Í¨¹ýʹÓÃÒÔÏÂÏÂÁî±à¼SambaÓû§ÉèÖÃÎļþÀ´Ìí¼ÓÐÂÓû§µÄ»á¼ûȨÏÞ£º
sudo nano /etc/samba/smb.conf
µÇ¼ºó¸´ÖÆ µÇ¼ºó¸´ÖÆ
ÔÚÎļþµÄĩβÌí¼ÓÒÔÏÂÄÚÈÝ£¬²¢½«”username”Ì滻Ϊ֮ǰ½¨ÉèµÄÓû§Ãû£º
[share] valid users = username
µÇ¼ºó¸´ÖÆ
Îå¡¢ÖØÆôЧÀÍ
ÖØÆôSambaЧÀÍ£¬Ê¹ÄãµÄÉèÖÃÉúЧ£º
sudo service smbd restart
µÇ¼ºó¸´ÖÆ
Áù¡¢»á¼û¹²ÏíÎļþ¼Ð
ÔÚWindowsϵͳÖУ¬·¿ª×ÊÔ´ÖÎÀíÆ÷£¬ÊäÈëÒÔϵصã»á¼û¹²ÏíÎļþ¼Ð£º
\linux-ip-addressshare
µÇ¼ºó¸´ÖÆ
½«”linux-ip-address”Ì滻ΪÄãµÄLinuxϵͳµÄIPµØµã¡£
ÊäÈë֮ǰÉèÖõÄSambaÓû§ÃûºÍÃÜÂ룬¼´¿É»á¼ûÎļþ¼Ð¡£
Æß¡¢×ܽá
ͨ¹ýÉèÖÃSamba£¬ÎÒÃÇ¿ÉÒÔÔÚLinuxϵͳÉÏÇáËÉÉèÖÃÎļþ¹²Ïí¡£±¾ÎÄÌṩÁË×°ÖÃSamba¡¢½¨Éè¹²ÏíÎļþ¼Ð¡¢ÉèÖÃÓû§ºÍ»á¼û¹²ÏíÎļþ¼ÐµÄÏêϸ°ì·¨£¬²¢ÌṩÁËÏìÓ¦µÄÏÂÁîʾÀý¡£Ï£Íû±¾ÎĶÔÄãÔÚLinuxÉÏÉèÖÃÎļþ¹²ÏíÓÐËù×ÊÖú¡£
ÒÔÉϾÍÊÇÔõÑùÔÚLinuxÉÏÉèÖÃÎļþ¹²Ïí£¨ÈçSamba£©µÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡