とりあえず使えるようにしただけ

一緒に入っていたあれこれ

WindowsMacintosh でデータをやりとりするのにサーバを使おうかと。マックは netatalk でアクセス、Windows は samba でアクセスってことに。いまどきはどちらも samba でってことなのかもしれないけど。

まずは apt-get で入れてみよう。

paraches@debian:~$ sudo apt-get install samba
パッケージリストを読みこんでいます... 完了
依存関係ツリーを作成しています... 完了
以下の特別パッケージがインストールされます:
  samba-common
提案パッケージ:
  samba-doc
以下のパッケージが新たにインストールされます:
  samba samba-common
アップグレード: 0 個、新規インストール: 2 個、削除: 0 個、保留: 1 個。
4925kB のアーカイブを取得する必要があります。
展開後に追加で 11.9MB のディスク容量が消費されます。
続行しますか? [Y/n]
取得:1 ftp://ring.hosei.ac.jp stable/main samba-common 3.0.14a-3sarge1 [2154kB]
取得:2 ftp://ring.hosei.ac.jp stable/main samba 3.0.14a-3sarge1 [2772kB]
4925kB を 17s で取得しました (290kB/s)
パッケージを事前設定しています ...

で、この後あれこれ聞かれる。ワークグループを入力して後はデフォルトで return を押すだけ。事前設定が終わるとまたインストールが始まる。

未選択パッケージ samba-common を選択しています。
(データベースを読み込んでいます... 現在 41659 個のファイルとディレクトリがインストールされています。)
(.../samba-common_3.0.14a-3sarge1_powerpc.deb から) samba-common を展開しています...
未選択パッケージ samba を選択しています。
(.../samba_3.0.14a-3sarge1_powerpc.deb から) samba を展開しています...
samba-common (3.0.14a-3sarge1) を設定しています ...

samba (3.0.14a-3sarge1) を設定しています ...
Generating /etc/default/samba...
TDBSAM version too old (0), trying to convert it.
TDBSAM converted successfully.
account_policy_get: tdb_fetch_uint32 failed for field 1 (min password length), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 2 (password history), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 3 (user must logon to change password), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 4 (maximum password age), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 5 (minimum password age), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 6 (lockout duration), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 7 (reset count minutes), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 8 (bad lockout attempt), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 9 (disconnect time), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 10 (refuse machine password change), returning 0
Starting Samba daemons: nmbd smbd.

paraches@debian:~$ 

インストールが無事終了したら早速設定をチトいぢる。すべては /etc/samba/smb.conf でできるので楽チン。

paraches@debian:/etc/samba$ sudo vi smb.conf

で、いぢる場所は2箇所。

# "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/ServerType.html in the samba-doc
# package for details.
;   security = user

ここの ; を削除。
次は

# By default, the home directories are exported read-only. Change next
# parameter to 'yes' if you want to be able to write to them.
   writable = no

writable = no で書き込みができないので、writable = yes にして書き込みをできるようにする。
で、samba をリスタート。

paraches@debian:/etc/init.d$ sudo ./samba restart
Stopping Samba daemons: nmbd smbd.
Starting Samba daemons: nmbd smbd.

最後にパスワードを登録(?)

paraches@debian:/etc/samba$ sudo smbpasswd -a paraches
New SMB password:
Retype new SMB password:
paraches@debian:/etc/samba$

これでサーバの自分のフォルダをマウントできました。