LoginSignup
1
2

More than 5 years have passed since last update.

sambaの設定

Last updated at Posted at 2017-10-28

samba

win用文字コードの指定と最下部に共有ポイントを追加

$ sudo vi /etc/samba/smb.conf
[global]
dos charset = CP932
valid users = hoge1 hoge2 アクセス許可ユーザ
valid users = +hogegroup システムグループ指定

[public]
  # Windows側から見た時に付加されるコメント
  comment = Public space; anyone can write any files.
  # 共有するディレクトリのパス
  path = /media/hogehoge
  # guestユーザのアクセスを許可するか
  guest ok = no
  # 読み出しのみ可能か
  read only = no
  writable = yes
  # 書き込みを許可する
  writable = Yes
  # 強制的にファイルに与えるアクセス権
  create mode = 0664
  # 強制的にディレクトリに与えるアクセス権
  directory mode = 0775

下記のようにUNIXのシステムアカウントと同期するよう設定しておく

unix password sync = yes

Linuxユーザと同期する設定にしておく

$ sudo sambapasswd -a hoge
1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2