Sambaの設定


全体の設定(/usr/local/etc/smb.conf)

  • まず、デフォルトの設定ファイルを「/usr/local/etc/smb.conf」としてコピーします。
    # cd /usr/local/etc
    # cp smb.conf.default smb.conf
    

  • [global]セクションを修正します。注釈以外の部分はデフォルトのままです。

    【/usr/local/etc/smb.conf】
    [global]
       workgroup = NAKAMURA         <--Windowsのワークグループに合わせて修正
       load printers = yes
       log file = /var/log/log.%m
       max log size = 50
       security = user
       encrypt passwords = yes      <--コメントを外す
       socket options = TCP_NODELAY 
       dns proxy = no 
    [homes]
       comment = Home Directories
       browseable = no
       writeable = yes
    [printers]
       comment = All Printers
       path = /var/spool/samba
       browseable = no
       guest ok = no
       writeable = no
       printable = yes
    



ユーザの設定(/usr/local/private/smbpasswd)

  • OSのユーザ設定ファイル「/etc/passwd」から「/usr/local/bin/make_smbpasswd」スクリプトにより作成します。
    # cat /etc/passwd | /usr/local/bin/make_smbpasswd > /usr/local/private/smbpasswd

  • 次に、初期パスワードを設定します。
    # smbpasswd hnakamur
    New SMB password:
    Retype new SMB password:
    Password changed for user hnakamur.
    


Sambaの起動設定

  • 起動用のサンプルスクリプトをコピーします。これでマシン起動時にSambaも一緒に起動されます。
    # cd /usr/local/etc/rc.d
    # cp samba.sh.sample samba.sh
    

前に戻る | 次へ進む

トップへもどる


Copyright (c) 2001 Hiroshi Nakamura. All rights reserved.