Samba共有にアクセスできますが、共有を一覧表示することはできません。

Samba共有にアクセスできますが、共有を一覧表示することはできません。

Samba用に構成された共有がいくつかあり(まだテスト中)、フルパス(\ testserver \ publicshareなど)を作成すると、Windowsコンピュータは共有にアクセスできますが、\ testserver \にアクセスすると権限エラーが発生します。そのSambaサーバーのすべての共有を見ることはできません。

何が問題なの?

これは私の設定ファイルです。

# Samba configuration -- Managed by Ansible, please don't edit manually
# vim: ft=samba
#
# Ansible managed

[global]
  # Server information
  netbios name = testserver
  workgroup = WORKGROUP
  server string = Fileserver %m

  fruit:aapl = yes

  # Logging
  logging = syslog

  # Authentication
  security = user
  passdb backend = tdbsam
  map to guest = Never
  guest account = server

  # Name resolution: make sure \\NETBIOS_NAME\ works
  wins support = yes
  local master = yes
  domain master = yes
  preferred master = yes

  # Don't load printers
  load printers = no
  printing = bsd
  printcap name = /dev/null
  disable spoolss = yes

  # Fix for CVE-2017-7494 in Samba versions from 3.5.0 and before 4.6.4
  # https://access.redhat.com/security/cve/cve-2017-7494
  nt pipe support = no


## Make home directories accessible
[homes]
  comment = Home Directories
  browseable = no
  writable = yes


## Shared directories
[publicshare]
  comment = Public share, writeable by all members of group ‘users’
  path = /home/server/samba/shares/public
  public = yes
  write list = +users
  force group = users
  browseable = yes
  create mode = 0664
  force create mode = 0664
  directory mode = 0775
  force directory mode = 0775

[TimeMachine]
  comment = Share useable as a TimeMachine backup target on MacOS
  vfs objects = fruit streams_xattr 
  fruit:time machine = yes
  path = /home/server/samba/shares/tm
  public = no
  write list = server
  force group = server
  guest ok = no
  browseable = no
  create mode = 0664
  force create mode = 0664
  directory mode = 0775
  force directory mode = 0775

私は実際にAnsibleを使ってSambaを配布しています。これは私のyamlファイルです。

---

# samba.yml

- name: Samba
  hosts: localhost
  connection: local
  become: true

  roles:
    - role: "bertvv.samba"
      tags: ["system"]
  vars:
      samba_apple_extensions: "yes"
      samba_guest_account: "server"
      samba_load_homes: true
      samba_netbios_name: "testserver"
      samba_shares:
      - name: publicshare
        comment: 'Public share, writeable by all members of group ‘users’'
        public: 'yes'
        write_list: +users
        group: users
        setype: public_content_t
        browseable: 'yes'
        path: /home/server/samba/shares/public
      - name: TimeMachine
        comment: 'Share useable as a TimeMachine backup target on MacOS'
        vfs_objects:
          - name: fruit
            options:
              - name: time machine
                value: 'yes'
          - name: streams_xattr
        path: /home/server/samba/shares/tm
        write_list: server
        owner: server
        group: server
        public: 'no'
        guest_ok: 'no'
        browseable: 'no'
      samba_map_to_guest: Never
      samba_users:
      - name: server
        password: -----

編集する: それを発見!このパラメータは次のとおりです。

nt pipe support = no

ベストアンサー1

問題は次のパラメーターにあります。

nt pipe support = no

これは私が使用しているAnsible Sambaの役割からのものです(https://galaxy.ansible.com/bertvv/samba)

CVE-2017-7494 リモートでコードが実行される脆弱性は Samba サーバーのインストールに影響を与える可能性があります。 Sambaバージョン3.5.0および4.6.4より前のバージョンが影響を受けます。システムでSELinuxが有効になっていると、脆弱ではありません。

この役割は、インストールされているSambaのバージョンが脆弱性の影響を受けていることを確認し、推奨される回避策を適用します。ntパイプサポートを追加=いいえ設定の[global]セクションに移動します。参考にしてください これにより、Windowsクライアントの共有ナビゲーションが無効になります。

必要に応じて、役割変数samba_mitigate_cve_2017_7494をfalseに設定して、キャリブレーションを明示的に無効にできます。

おすすめ記事