*Samba [#q54a4bc1]
*Samba3 [#q54a4bc1]

RIGHT:更新日 &lastmod();

*ファイル共有 [#n08113e6]
**ファイル共有 [#n08113e6]

***インストール [#j77a69c5]

# apt-get install samba

***設定 [#z45306d5]

/etc/samba/smb.cofで最低以下を設定

 [global]
 
 # charset (euc-jp)
    unix charset = eucJP-ms
    dos charset = cp932
    display charset = eucJP-ms
 
 workgroup = ISM
 
 server string = ism samba
 
 security = user <-- /etc/samba/smbpasswdのユーザを使用(普通これを選択)

''文字コード''

 unix charset	UNIX側での文字コードの設定(eucJP-ms UTF-8)
 dos charset	Windows側での文字コードの設定。日本語を利用する場合は、CP932 
 display charset	swat で表示される文字コードの指定

***起動 [#i81500b1]

 # /etc/rc.d/init.d/smb start

***ユーザ登録 [#u4ee830f]
ユーザはlinuxアカウントを事前に登録しておく必要がある

smb.cofで以下がコメントアウトのとき~
;   passdb backend = tdbsam~

''/etc/passwdファイルからsmbpasswdを作成''~
ファイルは作成されるがパスワードは作成されないので注意すること。あとからか作成する。

 # cd /etc/samba
 # /usr/bin/mksmbpasswd.sh < /etc/passwd > smbpasswd

注)mksmbpasswd.shに実行件がないときは追加する

''パスワード作成''~
 # /usr/bin/smbpasswd okada
 New SMB password: ******
 Retype new SMB password: ******

また、新しいユーザを追加sたときはlinuxアカウントを発行して(/sbin/nologinでもいいみたい)smbpasswdに以下ように同じように行を追加して/usr/bin/smbpasswd でパスワードを作成する

/etc/samba/smbpasswd

 #
 # SMB password file.
 #
 okada:500:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx:[U          ]:
 LCT-47725CAF:Okada
 admin:502:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx:[U          ]:
 LCT-477273B8:
 vmwinxp$:503:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx:[W
 ]:LCT-47727365:

注)$がついているのはマシン名

***Windowsから [#s2fd7b61]

ネットワークから 「\\(IPアドレス)\」でアクセスこのときWindowsのユーザも上記で設定したユーザ、パスワードでアクセスする

**SambaでPDC [#ycac8090]

/etc/samba/smb.conf

 [global]
 
 workgroup = ISM
 
 server string = ism samba
 
 security = user
 
 local master = yes
 
 os level = 65 <--32より大きくする
 
 domain master = yes
 
 preferred master = yes
 
 domain logons = yes
 
 logon path = \\%L\Profiles\%U
 
 netbios name = MYNAME
 logon drive = H:
 logon home = \\homeserver\%u\winprofile
 admin users = administrator     <--このアカウントでWindows側をドメインに参加させる
 
 [homes]
    comment = %U's Home Directory
    browseable = no
    writable = yes
 ;  create mask = 0644
 ;  directory mask = 0755
  
 [netlogon]
 path = /var/samba/netlogon
 read only = yes
 write list = ntadmin
 
 [Profiles]
 /var/samba/profiles
 read only = no
 create mask = 0600
 directory mask = 0700


トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS