[root@ufuso ~]# vi /etc/samba/smb.conf ← Samba設定ファイル編集
#======================= Global Settings =====================================
[global]
unix charset = UTF-8 ← 追加(Linux側日本語文字コード)
dos charset = CP932 ← 追加(Windows側日本語文字コード)
display charset = UTF-8 ← 追加(Linux側日本語文字コード)
# Hosts Allow/Hosts Deny lets you restrict who can connect, and you can
# specifiy it as a per share option as well
#
workgroup = MYGROUP
↓
workgroup = WORKGROUP ← 変更(Windowsのワークグループ名を指定)
※マイコンピュータのプロパティ⇒コンピュータ名タブ内のワークグループ欄を参照
server string = Samba Server Version %v
; netbios name = MYSERVER
; interfaces = lo eth0 192.168.12.2/24 192.168.13.2/24
hosts allow = 127. 192.168.1. ← 行頭の#を削除
# ----------------------- Standalone Server Options ------------------------
#
# Security can be set to user, share(deprecated) or server(deprecated)
#
# Backend to store user information in. New installations should
# use either tdbsam or ldapsam. smbpasswd is available for backwards
# compatibility. tdbsam requires no further configuration.
security = share ← userをshareに変更して、誰でもアクセスを可能にする
passdb backend = tdbsam
# You can choose a non default printing system using the Printing option
load printers = no ← 追加(プリンタ共有無効化)※Sambaでプリンタを共有しない場合
cups options = raw
[public] ← 行頭の ; を削除する。
comment = Public Stuff ← 行頭の ; を削除する。
path = /mnt/usbhd/all/public ← 行頭の ; を削除。共有フォルダまでのパスを入力。
外付けのUSBハードディスクにpublicというフォルダを作成した例
public = yes ← 行頭の ; を削除する。
writable = yes ← 行頭の ; を削除する。
only guest = yes ← 追加する。
共有ディレクトリのごみ箱機能追加(ここから)
※ファイル削除時に自動的にごみ箱へ移動されるようにする
vfs objects = recycle ← ごみ箱の有効化
recycle:repository = .recycle ← ごみ箱のディレクトリ名(/home/ユーザ名/.recycle)
recycle:keeptree = no ← ごみ箱へ移動時にディレクトリ構造を維持しない
recycle:versions = yes ← 同名のファイルがごみ箱にある場合に別名で移動
recycle:touch = no ← ごみ箱へ移動時にタイムスタンプを更新しない
recycle:maxsize = 0 ← ごみ箱へ移動するファイルのサイズ上限(0:無制限)
recycle:exclude = *.tmp ~$* ← ここで指定したファイルはごみ箱へ移動せずに即削除する
共有ディレクトリのごみ箱機能追加(ここまで)
|
|
コメントを残す