0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

RHEL8へのsambaインストール~共有設定

Posted at

samba for RHEL8

install

# dnf install samba samba-client samba-common

サービス起動設定

# systemctl start smb
# systemctl enable smb
# systemctl status smb

firewall設定

$ firewall-cmd --permanent --add-service=samba
$ firewall-cmd --reload

共有用ディレクトリ作成と設定

# mkdir -p /srv/samba/anonymous
# chmod -R 0777 /srv/samba/anonymous
# chown -R nobody:nobody /srv/samba/anonymous
chconユーティリティを使用して、作成したsamba共有ディレクトリのSELinuxセキュリティコンテキスト
# chcon -t samba_share_t /srv/samba/anonymous

smb設定(匿名共有のセクションを追加)


[global]
        workgroup = WORKGROUP
        netbios name = rhel
        security = user
...
[Anonymous]
        comment = Anonymous File Server Share
        path = /srv/samba/anonymous
        browsable = yes
        writable = yes
        guest ok = yes
        read only = no
        force user = nobody

samba構成チェックとサービス再起動

# testparm
# systemctl restart smb

samba接続ユーザ設定(anonymousできない場合)

# pdbedit -a ユーザー名(すでに作成してあるユーザを指定:例)masa)
0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?