転載・引用について

ユーザ用ツール

サイト用ツール


networkapp:samba

Samba Server

NetBSDでSamba Serverを建てるのが目的だが、取り敢えず、CentOSで試したのでその記録。 あとで、何とかNetBSDにも…でも、いまいち気合が入らない。

まぁ、実質、yumでinstallするか、pkgsrcでinstallするかくらいしか違わないと思うけど。

取り敢えず、ファイルをopenしたり、addしたりwriteしたりした場合に全て記録が出るようにしてみた。

  • sambaをInstall
    • yum -y install samba
  • smb.confを作成
    • [global]
       	dos charset = CP932
       	display charset = UTF-8
       	server string = Samba Server Version %v
       	log level = 1
       	debug prefix timestamp = Yes
       	debug hires timestamp = No
       	debug uid = Yes
       	enable core files = No
       	cups options = raw
       	hide special files = Yes
       	hide unreadable = Yes
       	printing = bsd
      
      [security]
       	comment = security
       	path = /samba/security
       	valid users = user1,user2,user3
       	read list = user1,user2,user3
       	write list = user1,user2
       	read only = No
       	vfs objects = full_audit			←VFSの動作全てを記録する
       	full_audit:failure = open pyrite unlink		←失敗の記録
       	full_audit:success = open pyrite unlink		←成功の記録
              create mask = 0777
              directory mask = 0777
  • rsyslogdを設定
    • /etc/rsyslog.confの末尾に以下を追加
    • # ### end of the forwarding rule ###
      
      user.*                                                  -/var/log/samba/audit.log
    • chkconfig nmb on
    • chkconfig smb on

CentOSで配布されるSambaは、DefaultでCUPSがLinkされている。 ソースコード上の問題で、/etc/samba/smb.conf内のprinting = cupsをprinting = bsdに差し替えないと、 CUPSに繋がらないというエラーが出る(daemonは起動するし正常に動作するが、logがうるさい)ので注意

このウェブサイトはクッキーを使用しています。 Webサイトを使用することで、あなたはあなたのコンピュータにクッキーを保存することに同意します。 また、あなたはあなたが私たちのプライバシーポリシーを読んで理解したことを認めます。 同意しない場合はウェブサイトを離れてください。クッキーに関する詳細情報
networkapp/samba.txt · 最終更新: 2018/05/14 13:29 by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki