µ±Ç°Î»ÖãºLinux½Ì³Ì - Samba - ÖÐСÆóÒµ·þÎñÆ÷ÅäÖ÷½°¸(Îļþ·þÎñÆ÷Ö®Sambaƪ)

ÖÐСÆóÒµ·þÎñÆ÷ÅäÖ÷½°¸(Îļþ·þÎñÆ÷Ö®Sambaƪ)



        
    ÌÀº£¾© (Ͷ¸å)

    µÚÎåÕ Îļþ·þÎñÆ÷
    µÚÒ»½Ú Samba·þÎñÆ÷
    & 1.1 ¼ò½é
    ÍøÂçµÄ×ÚÖ¼ÊǸüÈÝÒ×µØÔÚ¼ÆËã»ú¼ä¹²ÏíÐÅÏ¢, ÔÚ Linux·þÎñÆ÷ºÍWindows 98µÄ¿Í»§»úÖ®¼äʵÏÖ´òÓ¡¹²ÏíºÍÎļþ¹²ÏíÒѾ­³ÉΪһ¸öÖÐСÐÍÆóÒµ±ØÐë½â¾öµÄÎÊÌâ¡£
    Samba ʵ¼ÊÉÏÊÇÒ»×é³ÌÐò, ËüÃÇÈÃÄãµÄLinux·þÎñÆ÷»úÆ÷¶®µÃSMB (Server Messages Block)ЭÒé¡£SMBÊÇÒ»Ì×ͨѶЭÒ飬ÈÃÔËÐÐ OS/2£¬Windows NT£¬Windows 95£¬Windows for WorkgroupsµÄ¼ÆËã»úʵÏÖÎļþ¹²ÏíºÍ´òÓ¡»ú¹²Ïí·þÎñ¡£ÕâÌ×ЭÒéÀàËÆÓÚNFS (ÍøÂçÎļþϵͳ)ºÍlpd (Unix ±ê×¼´òÓ¡·þÎñÆ÷)£¬¼°Ò»Ì×·Ö²¼Ê½ÊÚȨÈÏ֤ϵͳ(Èç NIS »ò Kerberos)µÄ×éºÏ¡£ÔÚÔËÐÐ Samba ·þÎñÆ÷³ÌÐòµÄʱºò£¬ÄãµÄ Linux »úÆ÷ÔÚ"ÍøÂçÁÚ¾Ó"Öп´ÆðÀ´Èçͬһ̨ Windows »úÆ÷¡£Windows »úÆ÷µÄÓû§¿ÉÒÔ"µÇ¼"µ½ÄãµÄLinux·þÎñÆ÷ÉÏ, µ±È»ÕâÒªÇóÄã¸øÓèÊʵ±µÄȨÏÞ¡£
    Samba Ò²ÄÜ×öһЩһ°ãÀ´ËµÐèÒª Windows NT ·þÎñÆ÷È¥Íê³ÉµÄ¹¤×÷£¬Èç×÷Ϊһ¸ö WINS·þÎñÆ÷ºÍ´¦ÀíÀ´×ÔWindows 95 »úÆ÷µÄ "ÍøÂçµÇ¼" ÇëÇóµÈµÈ.

    (LinuxByteÏÂÔØSamba)
    & 1.2 ËùÐè×ÊÔ´
    &1.2.1 ËùÐè°ü
    RedHat6.2 ·þÎñÆ÷°²×°
    &1.2.2 ËùÐèÅäÖÃÎļþ
    /etc/smb.conf
    &1.3 ÅäÖ÷½°¸
    1. /etc/smb.conf
    ˵Ã÷£ºSambaÖ÷ÅäÖÃÎļþ
    Ô´Îļþ£º
    [global]
    netbios name = weboaserver
    ££Ö¸¶¨±¾»úÔÚÍøÉÏÁÚ¾ÓÖеÄÏÔʾÃû
    workgroup = weboa
    ££Ö¸¶¨±¾»úËùÊôµÄ¹¤×÷×é
    server string = WebOA Server
    ££Ö¸¶¨±¾»úµÄ±¸×¢
    ; hosts allow = 192.168.1. 192.168.2. 127.
    ££ÔÊÐí·ÃÎʱ¾»ú¹²Ïí
    printcap name = /etc/printcap
    load printers = yes
    printing = bsd
    guest account = nobody
    log file = /var/log/samba/log.%m
    max log size = 50
    security = share
    ;encrypt passwords = yes
    ;smb passwd file = /etc/smbpasswd
    ££Ö¸¶¨¶¨¶ÔÓû§¿ÚÁîУÑéµÄÃÜÂëÎļþ
    ££°²È«¼¶±ðΪÓû§¼¶£¬ÕâÑù¶¨ÒåÊÇΪÁËÈÃÿ¸ö98µÄ¿Í»§¶ËÄÜ×ÔÓÉʹÓÃËüÃÇÔÚLinux·þÎñÆ÷ÉϵÄĿ¼¡£
    socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
    ; interfaces = 192.168.12.2/24 192.168.13.2/24
    dns proxy = no
    [homes]
    comment = WebOAs Home Directories
    browseable = no
    writable = yes
    [printers]
    comment = All Printers
    path = /var/spool/samba
    browseable = no
    guest ok = yes
    writable = no
    printable = yes
    [public]
    comment = Public Stuff
    path = /usr/public
    browseable = yes
    guest ok = yes
    public = yes
    writable = yes
    ££¶¨ÒåÁ˹²ÏíĿ¼£¬ËùÓеÄÓû§¶ÔÕâ¸öĿ¼¶¼ÓжÁдȨÏÞ
    [ WebOA Printer ]
    comment = Freds Printer
    valid users = thj
    path = /homes/thj
    printer = WebOA_Printer
    public = no
    writable = no
    printable = yes
    ££ÒÔÉÏÊǶ¨Òå´òÓ¡»ú
    2. ¹ÜÀíÔ±Ö´ÐÐsmbadduser tanghj:smithjÀ´´´½¨Ò»¸ösmbÓû§£¬Ïà
    Ó¦µØ¸ü¸ÄÁË/etc/smbpasswd ºÍ /etc/smbusers¡£
    3. ¹ÜÀíÔ±ÐèÒªÖ´ÐÐ chmod 0777 /usr/public,ÐÞ¸Ä/usr/public·ÃÎÊ
    ȨÏÞ¡£
    & 1.4 ²âÊÔ¼°¹ÜÀí°ì·¨
    &1.4.1 ²âÊÔ·½·¨
    1£® ¹ÜÀíÔ±¿ÉÒÔͨ¹ýÖ´ÐÐ/etc/rc.d/init.d/smb restartʹ¸ü¸ÄµÄÅäÖÃ
    ÎļþÉúЧ¡£
    2£® testparm ÃüÁ½âÎöºÍÃèÊöÄãµÄ smb.conf ÎļþµÄÄÚÈÝ£¬ÌرðÓÐÓã¬
    ÒòΪËüÌṩÁËÒ»¸ö¼òÒ׵ķ½·¨·¢ÏÖÅäÖÃÉϵĴíÎó¡£
    & 1.5 С½á
    LinuxÊÇÒ»¸öÓÅÐãµÄÍøÂç²Ù×÷ϵͳ£¬Ëü¿ÉÓë¶àÖÖÍøÂ缯³É¡£LinuxϵͳµÄÎȶ¨ÐÔ¡¢¿É¿¿ÐÔÊܵ½Á˹ã´óÓû§µÄ»¶Ó­£¬ÔÚÖÐСÐÍÍø»òÕßÔÚ¹«Ë¾¡¢²¿ÃÅ¡¢µ¥Î»µÈÄÚ²¿Íø£¨Intranet£©ÉÏ£¬³£½«Linux³äµ±ÓÐЧ¶øÇ¿¾¢µÄÎļþºÍ´òÓ¡·þÎñÆ÷£¬ÈÃwindows¿Í»§»ú¹²ÏíLinuxϵͳÖеÄÎļþ¡£ÕâÖÖLinuxÓë windowsÍøÂ缯³ÉÊÇͨ¹ýsambaÀ´ÊµÏÖ¡£Æäʵ´ó¼Ò¿´ÁËÎÒ¹ØÓÚSambaµÄ½éÉÜÒѾ­ÓÐÁËÒ»¸öÇÐÉíµÄ¸Ð¾õ£¬¾ÍÊÇSambaµÄÅäÖÃÑ¡ÏîÌ«¶àÁË£¬µ«ÊÇҪʵÏÖÎÒÃǵÄÄ¿µÄÖ»ÐèÒª¸ü¸ÄÆäÖ⻶àµÄ²¿·Ö¾Í×ãÒÔʵÏÖÇ¿´óµÄÎļþ¡¢´òÓ¡¹²ÏíÁË¡£
    ·¢²¼ÈË:netbull À´×Ô: