LoginSignup
2
2

More than 5 years have passed since last update.

Samba (Windows) 対応の設定

Posted at

初期設定

コマンド
# samba インストール
yum install samba samba-devel  samba-client

# 設定変更
cd /etc/samba/
cp -p smb.conf smb.conf.$(date -I)
# vi smb.conf

# ユーザー作成
useradd  ftpuser
passwd   ftpuser
pdbedit -a -u ftpuser

# 起動設定
systemctl enable smb nmb
systemctl start  smb nmb
systemctl status smb nmb


設定ファイル

samba.conf
[global]
    # セキュリティ
    workgroup          = SAMBA
    security           = user
    passdb backend     = tdbsam
    hosts allow        = 192.168.56.0/24
    unix password sync = Yes
    passwd program     = /usr/bin/passwd %u
    ntlm auth          = yes
    # ログ設定
    log level       = 1
    log file        = /var/log/samba/smb.log.%m
    max log size    = 5000
    # パーミッション設定
    browseable      = No
    read only       = No
    # ファイルマスク
    create mask     = 0664
    directory mask  = 0775
    # ゲストの利用
    guest ok        = no
    guest account   = ftpuser
    map to guest    = bad user
    # プリンタサーバー
    load printers   = no
    # 文字コード設定
    dos charset     = CP932
    unix charset    = UTF-8

[homes]
    # 基本設定
    comment         = Home Directories
    # パーミッション設定
    inherit acls    = Yes
    writable        = Yes

[www]
    # 基本設定
    comment         = HTTPD Document Root
    path            = /var/www
    # パーミッション設定
    writable        = Yes
    browseable      = Yes
    # ゲストの利用
    guest ok        = yes
2
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
2
2