[smb.confの設定]

[global]
   security = user
   encrypt passwords = true
   domain logons = Yes
   domain master = yes
   wins support = yes
   profile acls = Yes
   local master = yes
   preferref master = yes
   panic action = /usr/share/samba/panic-action %d
   dos charset = CP932
   unix charset = CP932
   display charset = LOCALE
   workgroup = DOMAINNAME
   server string = SERVERNAME
   socket options = TCP_NODELAY SO_SNDBUF=8192 SO_RCVBUF=8192
   dns proxy = No
   netbios name = SERVERNAME
   os level = 65

   passdb backend = smbpasswd ←パスワード認証はsmbpasswdを使用
   #passdb backend = smbpasswd guest
   obey pam restrictions = Yes
   pam password change = Yes
   passwd program = /usr/bin/passwd %u
   passwd chat = *New*password* %n\n *Retype*new*password* %n\n *passwd:*all*authentication*tokens*updated*successfully*
   unix password sync = yes
   guest account = nobody
   null passwords = yes
   guest only = no
   username level = 12
   password level = 8

   map to guest = Bad User

   browsable = no
   preserve case = yes
   short preserve case = yes
   veto files = /.AppleDesktop/Network Trash Folder/TheVolumeSettingsFolder/.AppleDouble/.AppleDB/
   delete veto files = yes

   invalid users = mail, deamon, adt
   admin users = administrator
   username map = /etc/samba/smbusers

   logon path = \\%L\profiles\%U
   logon script = logon.bat  ←ログオンスクリプトのファイル名
   #logon script = %U.bat  ←ユーザ毎にスクリプトを作成する場合はこちら

   getwd cache = yes
   printcap name = cups
   load printers = yes
   printing = cups

[homes]
   comment = %U
   writeable = Yes
   create mask = 0700
   directory mask = 0700
   browseable = No

[netlogon]
   path = /home/samba/netlogon
   browseable = No
#    writeable = no
#    guest ok = yes

[profiles]
   path = /home/samba/profiles
   writeable = Yes
   guest ok = Yes

[printers]
   comment = samba printer
   path = /var/spool/samba
   browseable = yes
   printable = yes
   guest ok = yes
   use client driver = yes

[share]
   comment = 共有フォルダ
   path = /samba/fs/share
   browsable = yes
   printable = no
   writable = yes
   guest ok = yes
   force create mode = 777
   force directory mode = 777

[private]
   comment = 制限付きフォルダ
   path = /samba/fs/private
   browsable = no
   printable = no
   writable = yes
   guest ok = no
   valid users = user1, user2 ←許可するユーザを指定する場合
   force create mode = 750
   force directory mode = 750
   force user = user1 ←user1として使用します
  • ユーザ・パスワードの作成 rootのパスワードを設定します。
    # smbpasswd -a root
    Windowsのadministratorから管理をしたい場合は、administratorを追加します。
    # useradd administrator
    # smbpasswd -a administrator
    Sambaのユーザ・アカウントは英大文字は使用せず、英子文字、数字のみで15バイト以下とすること。(日本語も使用不可)

[プロファイル保存ディレクトリの作成]

# mkdir /home/samba/profiles
# chmod 777 /home/samba/profiles

[ログオンスクリプト保存ディレクトリの作成]

# mkdir /home/samba/netlogon
# chmod 777 /home/samba/netlogon

ログオンスクリプト例 起動時にshareフォルダを割り当てます logon.bat

net use * \\SERVERNAME\share

sambaの起動

# /etc/init.d/samba start

FrontPage


トップ   編集 凍結解除 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2010-02-10 (水) 00:00:00 (3535d)