Install Samba Server บน Ubuntu

จาก WikiBall

การปรับปรุง เมื่อ 17:44, 9 ตุลาคม 2552 โดย Spnball (พูดคุย | เรื่องที่เขียน)
(ต่าง) ←รุ่นก่อนหน้า | รุ่นปัจจุบัน (ต่าง) | รุ่นถัดไป→ (ต่าง)
ข้ามไปที่: นำทาง, ค้นหา

นำความรู้เก่าที่การเปิดใช้งานระบบ file sharing บนวินโดว์ หรือ samba บนเครื่อง Ubuntu

เนื้อหา

ติดตั้ง

ก่อนอื่น ลง samba ก่อน

    sudo apt-get install samba smbfs

Authentication

Config

    sudo vim /etc/samba/smb.conf
    ####### Authentication #######

    # “security = user” is always a good idea. This will require a Unix account
    # in this server for every user accessing the server. See
    # /usr/share/doc/samba-doc/htmldocs/Samba-HOWTO-Collection/ServerType.html
    # in the samba-doc package for details.
    ;  security = user

เอา comment ออก เพิ่มไปอีกบรรทัดนึง

    security = user
    username map = /etc/samba/smbusers

Create a Samba User

สร้าง smb password

    sudo smbpasswd -a <username>

สร้าง smbusers file

    sudo vim /etc/samba/smbusers

ถ้าต้องการใช้ username ให้เหมือนที่ใช้ username ของ Ubuntu

<ubuntuusername> = “<samba username>” 

หรือถ้าต้องการสร้าง username ขึ้นมาใหม่โดยไม่ผูกกับ OS

    <username> = “<username>”

สร้าง directory

 sudo vim smb.conf
[dirname]
   comment = The ball's comment
   path = /path/to/share/file
   browseable = yes
   read only = no
   guest ok = no
   write list = root, <username>
เครื่องมือส่วนตัว