「POSIX ACLs を利用して共有を設定する」の版間の差分

提供:雑廉堂Wiki
ページの作成:「= はじめに = SambaはPOSIXアクセス制御リスト(ACL)との共有をサポートしています。 それらを使用すると、UNIXユーティリティ…」
 
 
(同じ利用者による、間の14版が非表示)
10行目: 10行目:
{{Imbox
{{Imbox
| type = content
| type = content
| style = margin:4px 2%;
| text = Samba Active Directory(AD)ドメインコントローラ(DC)では、Windows ACLサポートはグローバルに有効になっているので、POSIX ACLとの共有はサポートされていません。
| text = Samba Active Directory(AD)ドメインコントローラ(DC)では、Windows ACLサポートはグローバルに有効になっているので、POSIX ACLとの共有はサポートされていません。
}}
}}


= ホストの準備 =
= ホストの準備 =


共有を作成する前に、Sambaをセットアップしてください。 詳しくは、以下を参照してください。
共有を作成する前に、Sambaをセットアップしてください。 詳しくは、以下を参照してください。
* [[Setting_up_Samba_as_a_Domain_Member | Sambaをドメインメンバーとして設定]]
* [[Sambaをドメインメンバーとして設定 | Sambaをドメインメンバーとして設定]]
* [[Setting_up_Samba_as_an_NT4_PDC_(クイックスタート)| SambaをNT4 PDCとしてセットアップする(クイックスタート)]]
* [[SambaをNT4 PDCとしてセットアップする(クイックスタート)| SambaをNT4 PDCとしてセットアップする(クイックスタート)]]
* [[Setting_up_Samba_as_an_NT4_BDC | SambaをNT4 BDCとして設定する]]
* [[SambaをNT4 BDCとして設定する | SambaをNT4 BDCとして設定する]]
* [[Setting_up_Samba_as_a_Standalone_Server | Sambaをスタンドアロンサーバーとして設定]]
* [[Sambaをスタンドアロンサーバーとして設定 | Sambaをスタンドアロンサーバーとして設定]]




29行目: 26行目:




= Making Files Executable =
= ファイルを実行可能にする =


Using the default setting, users are only able to execute files, such as <code>*.exe</code> and <code>*.bat</code>, on a Samba share if they have the POSIX x-bit set. For example, the following file is executable for the <code>root</code> user and members of the <code>Domain Users</code> group:
デフォルト設定を使用すると、POSIX x-bitが設定されている場合、ユーザはSamba共有上で<code>*.exe</code><code>*.bat</code>などのファイルのみを実行できます。。たとえば、次のファイルは<code>root</code>ユーザーおよび<code>Domain Users</code>グループのメンバーに対して実行可能です:


  -rw<u>x</u>r-<u>x</u>--- 1 root "Domain Users" 133160 1. Jan 00:00 /srv/samba/Demo/example.exe
  -rw<u>x</u>r-<u>x</u>--- 1 root "Domain Users" 133160 1. Jan 00:00 /srv/samba/Demo/example.exe


In some scenarios it is necessary to enable users to execute all files on a share, regardless if the x-bit is set. To enable, set in the <code>[global]</code> section of your <code>smb.conf</code>:
シナリオによっては、xビットが設定されているかどうかにかかわらず、ユーザーが共有上のすべてのファイルを実行できるようにする必要があります。 有効にするには、<code>smb.conf</code><code>[global]</code>セクションで設定します。:


  acl allow execute always = yes
  acl allow execute always = yes


= 共有を追加する =


共有名<code>Demo</code>を使用して<code>/srv/samba/Demo/</code>ディレクトリを共有するには、次の手順を実行します:


 
* ディレクトリを作成:
 
= Adding a Share =
 
To share the <code>/srv/samba/Demo/</code> directory using the <code>Demo</code> share name:
 
* Create the directory:


  # mkdir -p /srv/samba/Demo/
  # mkdir -p /srv/samba/Demo/


* Add the <code>[Demo]</code> share definition to your <code>smb.conf</code> file:
* 共有の定義<code>[Demo]</code><code>smb.conf</code>ファイルに追加します。:


  [Demo]
  [Demo]
57行目: 50行目:
         read only = no
         read only = no


: These are the minimum parameters required to set up a writeable share. Optionally, you can set share permissions. For details, see [[#Setting_Share_Permissions|Setting Share Permissions]].
: これらは、書き込み可能な共有を設定するために必要な最小限のパラメータです。 必要に応じて、共有権限を設定できます。 詳細は[[#共有アクセス許可の設定 |共有アクセス許可の設定]]をご覧ください。


* Reload the Samba configuration:
* Sambaの設定をリロード:


  # smbcontrol all reload-config
  # smbcontrol all reload-config


= ACLを設定 =


== 標準UNIX ACLを設定 ==


UNIXオペレーティングシステムの標準アクセス制御リスト(ACL)は、1人の所有者、1つのグループ、およびその他すべての人(その他)に対するアクセス許可の設定をサポートしています。 ディレクトリに複数のACLを設定する必要がある場合は、[[#拡張ACLの設定 |拡張ACLの設定]]を参照してください。


 
例えば、<code>/srv/samba/Demo/</code>ディレクトリの所有者を<code>root</code>にするには、所有者と<code>Domain Users</code>グループに読み書きの許可を付与し、そして他のすべてのユーザーに対してはアクセスを拒否します。次のように入力してください:
= Setting ACLs =
 
== Setting Standard UNIX ACLs ==
 
The standard access control lists (ACL) on a UNIX operating system supports setting permissions for one owner, one group, and everyone else (other). If you need to set multiple ACLs on a directory, see [[#Setting_Extended_ACLs|Setting Extended ACLs]].
 
For example, to set the owner of the <code>/srv/samba/Demo/</code> directory to <code>root</code>, grant read and write permissions to the owner and the <code>Domain Users</code> group, and deny access to all other users, enter:


  # chmod 2770 /srv/samba/Demo/
  # chmod 2770 /srv/samba/Demo/
79行目: 68行目:


{{Imbox
{{Imbox
| type = note
| type = notice
| text = Setting the SGID bit (<code><u>2</u>770</code>) automatically inherits the directory's group to all new files and directories created, instead setting it to the user's primary group.
| style = margin:4px 2%;
| text = SGIDビットを設定すると(<code><u>2</u>770</code>)、ディレクトリのグループは自動的にすべての新しいファイルと作成されたディレクトリに継承され、代わりにユーザーのプライマリグループに設定されます。(原文: Setting the SGID bit (<code><u>2</u>770</code>) automatically inherits the directory's group to all new files and directories created, instead setting it to the user's primary group.)
}}
}}


For further details about the permissions, see the <code>chmod(1)</code> and <code>chown(1)</code> man page.
For further details about the permissions, see the <code>chmod(1)</code> and <code>chown(1)</code> man page.


== 拡張ACLを設定 ==


ファイルシステムが拡張アクセス制御リスト(ACL)をサポートしている場合は、拡張POSIX ACLを使用できます。 WindowsのACLと同じように、ファイルやディレクトリ上の複数のユーザーやグループに権限を設定することができます。 ただし、POSIX ACLは次の一般的な権限モードに制限されています:


== Setting Extended ACLs ==
If your file system supports extended access control lists (ACL), you can use extended POSIX ACLs. They enable you to set permissions for multiple users and groups on a file or directory - similar to Windows ACLs. However, POSIX ACLs are limited to the following general permissions modes:
* None
* None
* Read
* Read
95行目: 84行目:
* Full control
* Full control


For example, to set read, write, and execute permissions for the <code>Domain Admins</code> group, read and execute permissions for the <code>Domain Users</code> group, and deny access to everyone else on the <code>/srv/samba/Demo/</code> directory:
たとえば、<code>Domain Admins</code>グループに対する読み取り、書き込み、および実行権限を設定するには、<code>Domain Users</code>グループに対する読み取りおよび実行権限を使用し、<code>/srv/samba/Demo/</code>ディレクトリで他のユーザー全員へのアクセスを拒否します:


* Add the <code>inherit acls = yes</code> parameter to the share's configuration. For example:
* <code>inherit acls = yes</code>パラメータを、その共有の設定に追加してください。例えば次のように入力してください:
  [Demo]
  [Demo]
         path = /srv/samba/Demo/
         path = /srv/samba/Demo/
         read only = no
         read only = no
         inherit acls = yes
         inherit acls = yes
: The <code>inherit acls = yes</code> parameter enables ACL inheritance of extended ACLs. For further details, see the parameter description in the <code>smb.conf</code> man page.
: <code>inherit acls = yes</code>パラメータは拡張ACLのACLの継承を有効にします。詳細は、<code>smb.conf</code>のマニュアルページのパラメータの説明を参照してください。


* Reload Samba:
* Samba をリロード:


  # smbcontrol all reload-config
  # smbcontrol all reload-config


* Verify that the directory is stored on a file system that supports extended ACLs. For details, see [[File System Support]].
* ディレクトリが拡張ACLをサポートするファイルシステムに格納されていることを確認します。 詳細については、[[ファイルシステムのサポート]]を参照してください。


* Disable auto-granting permissions for the primary group of user accounts:
* ユーザーアカウントのプライマリグループに対するアクセス許可の自動付与を無効にします:
  # setfacl -m group::--- /srv/samba/Demo/
  # setfacl -m group::--- /srv/samba/Demo/
  # setfacl -m default:group::--- /srv/samba/Demo/
  # setfacl -m default:group::--- /srv/samba/Demo/
: The primary group of the directory is additionally mapped to the dynamical <code>CREATOR GROUP</code> principal. If you use extended POSIX ACLs on a Samba share, this principal is automatically added and you cannot remove it. For further details about the <code>CREATOR GROUP</code> principal, see [https://support.microsoft.com/de-at/help/243330/well-known-security-identifiers-in-windows-operating-systems Well-known security identifiers in Windows operating systems].
: ディレクトリのプライマリグループは、動的な<code>CREATOR GROUP</code>プリンシパルにさらにマッピングされます。 Samba共有で拡張POSIX ACLを使用する場合、この主体は自動的に追加され、削除することはできません。<code>CREATOR GROUP</code>プリンシパルの詳細については、[https://support.microsoft.com/de-at/help/243330/well-known-security-identifiers-in-windows-operating-systems Well-known security identifiers in Windows operating systems]を参照してください。


* Set the permissions on the directory:
* ディレクトリにアクセス許可を設定:


:* Grant read, write, and execute permissions to the <code>Domain Admins</code> group:
:* <code>Domain Admins</code>グループに読み取り、書き込み、および実行権限を付与します:
  # setfacl -m group:"SAMDOM\Domain Admins":rwx /srv/samba/Demo/
  # setfacl -m group:"SAMDOM\Domain Admins":rwx /srv/samba/Demo/


:* Grant read and execute permissions to the <code>Domain Users</code> group:
:* <code>Domain Users</code>グループに読み取り権限と実行権限を付与します:
  # setfacl -m group:"SAMDOM\Domain Users":r-x /srv/samba/Demo/
  # setfacl -m group:"SAMDOM\Domain Users":r-x /srv/samba/Demo/


:* Set permissions for the <code>other</code> ACL entry to deny access to users that do not match other ACL entries:
:* 他のACLエントリと一致しないユーザーへのアクセスを拒否するには、<code>other</code> ACLエントリにアクセス許可を設定します:
  # setfacl -R -m other::--- /srv/samba/Demo/
  # setfacl -R -m other::--- /srv/samba/Demo/


: These settings are only applied to the directory itself. In Windows, this is converted to <code>This folder only</code>.
: これらの設定はディレクトリ自体にのみ適用されます。 Windowsでは、これは<code>このフォルダのみ</code>に変換されます。


* To configure that the same permissions set in the previous step are inherited to new file system objects created in this directory, enter:
* 前の手順で設定したのと同じ権限が、このディレクトリに作成された新しいファイルシステムオブジェクトに継承されるように設定するには、次のように入力します:


  # setfacl -m default:group:"SAMDOM\Domain Admins":rwx /srv/samba/Demo/
  # setfacl -m default:group:"SAMDOM\Domain Admins":rwx /srv/samba/Demo/
134行目: 123行目:
  # setfacl -m default:other::--- /srv/samba/Demo/
  # setfacl -m default:other::--- /srv/samba/Demo/


: With this settings, the <code>This folder only</code> mode for the principals now changed to <code>This folder, subfolders, and files</code>.
: この設定で、プリンシパルに対する<code>このフォルダのみ</code>モードが<code>このフォルダ、サブフォルダおよびファイル</code>に変更されます。


The ACLs set in the previous steps are mapped to the following Windows ACLs:
前の手順で設定したACLは、次のWindows ACLにマッピングされます:


{| class="wikitable"
{| class="wikitable"
180行目: 169行目:
|}
|}


<nowiki>*</nowiki> Configuring or removing these principals from the ACLs is only supported when using Windows ACLs. For details, see [[Setting up a Share Using Windows ACLs]].
<nowiki>*</nowiki> これらのプリンシパルをACLから構成または削除することは、Windows ACLを使用している場合にのみサポートされます。 詳細については、[[Windows ACLs を利用して共有を設定する]]を参照してください。
 
For further details, see the <code>setfacl</code> man page.
 
 


詳しくは、<code>setfacl</code>のマニュアルページを参照してください。


= 共有権限を設定する =


= Setting Share Permissions =
''オプション'': Sambaはユーザーが接続したときに検証される各共有に許可を設定することを可能にします。


''Optional'': Samba enables you to set permissions on each share which are validated when a user connects.
共有上のコンテンツへのアクセスは、ファイルシステムのアクセス制御リスト(ACL)を使用して制御されます。 詳細は、[[#Samba共有へのPOSIX_ACLの設定 | Samba共有へのPOSIX ACLの設定]]を参照してください。


Access to the content on a share, is controlled using file system access control lists (ACL). For details, see [[#Setting_POSIX_ACLs_on_a_Samba_Share|Setting POSIX ACLs on a Samba Share]]






== Configuring User and Group-based Share Access ==
== ユーザーおよびグループベースの共有アクセスを構成する ==


Share-based access control enables you to grant or deny access to a share for certain users and groups. For example, to enable all members of the <code>Domain Users</code> group to access a share while access is denied for the <code>example_user</code> account, add the following parameters to the share's configuration:
共有ベースのアクセス制御を使用すると、特定のユーザーおよびグループに対して共有へのアクセスを許可または拒否することができます。 たとえば、<code>example_user</code>アカウントへのアクセスが拒否されている間に<code>Domain Users</code>グループのすべてのメンバーが共有にアクセスできるようにするには、共有の設定に次のパラメータを追加します。:


         valid users = +SAMDOM\"Domain Users"
         valid users = +SAMDOM\"Domain Users"
         invalid users = SAMDOM\example_user
         invalid users = SAMDOM\example_user


The <code>invalid users</code> parameter has a higher priority than the <code>valid users</code> parameter. For example, if the <code>example_user</code> account is a member of the <code>Domain Users</code> group, access is denied for this account in the previous example.
<code>invalid users</code>パラメータは、<code>valid users</code>パラメータよりも優先度が高くなります。 たとえば、<code>example_user</code>アカウントが<code>Domain Users</code>グループのメンバーである場合、前の例ではこのアカウントへのアクセスは拒否されています。


For further details, see the parameter descriptions in the <code>smb.conf(5)</code> man page.
詳しくは、<code>smb.conf(5)</code>のマニュアルページのパラメータの説明を参照してください。






== Configuring Host-based Share Access ==
== ホストベースの共有アクセスの設定 ==


Host-based access control enables you to grant or deny access to a share based on host names, IP addresses, or IP ranges. For example, to enable the 127.0.0.1 IP address, the 10.99.0.0/24 IP range, and the <code>GoodHost</code> host name to access a share, and additionally deny access for the <code>BadHost</code> host name, add the following parameters to the share's configuration:
ホストベースのアクセス制御を使用すると、ホスト名、IPアドレス、またはIP範囲に基づいて共有へのアクセスを許可または拒否できます。 たとえば、127.0.0.1のIPアドレス、10.99.0.0 / 24のIP範囲、および<code>GoodHost</code>のホスト名で共有にアクセスし、さらにホスト名が<code>BadHost</code>のアクセスを拒否するには、共有の設定に次のパラメータを追加します:


         hosts allow = 127.0.0.1 10.99.0.0/24 GoodHost
         hosts allow = 127.0.0.1 10.99.0.0/24 GoodHost
         hosts deny = BadHost
         hosts deny = BadHost


The <code>hosts deny</code> parameter has a higher priority than the <code>hosts allow</code> parameter. For example, if <code>BadHost</code> resolves to an IP address that is listed in the <code>hosts allow</code> parameter, access to this host is denied.
<code>hosts deny</code>パラメータは<code>hosts allow</code>パラメータより高い優先順位を持ちます。 たとえば、<code>BadHost</code><code>hosts allow</code>パラメータに記載されているIPアドレスで解決された場合でも、このホストへのアクセスは拒否されます。
 


For further details, see the parameter descriptions in the <code>smb.conf(5)</code> man page.
For further details, see the parameter descriptions in the <code>smb.conf(5)</code> man page.

2019年3月1日 (金) 21:00時点における最新版

はじめに

SambaはPOSIXアクセス制御リスト(ACL)との共有をサポートしています。 それらを使用すると、UNIXユーティリティを使用してSambaホスト上でローカルに権限を管理できます。 共有のファイルシステムが拡張属性をサポートしている場合は、WindowsのACLと同様に、拡張POSIX ACLを使用して複数のユーザーおよびグループをACLに設定できます。 詳細は拡張ACLの設定をご覧ください。 細かいWindows ACLが必要な場合は、代わりにWindows ACLを使用して共有を設定してください。 詳細については、 Windows ACLを使用した共有の設定を参照してください。

Sambaは、以下のPOSIX ACLとの共有をサポートしています。

  • ドメインメンバー
  • NT4 PDCとBDC
  • スタンドアロンホスト

{{#invoke:Message box|imbox}}

ホストの準備

共有を作成する前に、Sambaをセットアップしてください。 詳しくは、以下を参照してください。



ファイルを実行可能にする

デフォルト設定を使用すると、POSIX x-bitが設定されている場合、ユーザはSamba共有上で*.exe*.batなどのファイルのみを実行できます。。たとえば、次のファイルはrootユーザーおよびDomain Usersグループのメンバーに対して実行可能です:

-rwxr-x--- 1 root "Domain Users" 133160 1. Jan 00:00 /srv/samba/Demo/example.exe

シナリオによっては、xビットが設定されているかどうかにかかわらず、ユーザーが共有上のすべてのファイルを実行できるようにする必要があります。 有効にするには、smb.conf[global]セクションで設定します。:

acl allow execute always = yes

共有を追加する

共有名Demoを使用して/srv/samba/Demo/ディレクトリを共有するには、次の手順を実行します:

  • ディレクトリを作成:
# mkdir -p /srv/samba/Demo/
  • 共有の定義[Demo]smb.confファイルに追加します。:
[Demo]
       path = /srv/samba/Demo/
       read only = no
これらは、書き込み可能な共有を設定するために必要な最小限のパラメータです。 必要に応じて、共有権限を設定できます。 詳細は共有アクセス許可の設定をご覧ください。
  • Sambaの設定をリロード:
# smbcontrol all reload-config

ACLを設定

標準UNIX ACLを設定

UNIXオペレーティングシステムの標準アクセス制御リスト(ACL)は、1人の所有者、1つのグループ、およびその他すべての人(その他)に対するアクセス許可の設定をサポートしています。 ディレクトリに複数のACLを設定する必要がある場合は、拡張ACLの設定を参照してください。

例えば、/srv/samba/Demo/ディレクトリの所有者をrootにするには、所有者とDomain Usersグループに読み書きの許可を付与し、そして他のすべてのユーザーに対してはアクセスを拒否します。次のように入力してください:

# chmod 2770 /srv/samba/Demo/
# chown root:"Domain Users" /srv/samba/Demo/

{{#invoke:Message box|imbox}}

For further details about the permissions, see the chmod(1) and chown(1) man page.

拡張ACLを設定

ファイルシステムが拡張アクセス制御リスト(ACL)をサポートしている場合は、拡張POSIX ACLを使用できます。 WindowsのACLと同じように、ファイルやディレクトリ上の複数のユーザーやグループに権限を設定することができます。 ただし、POSIX ACLは次の一般的な権限モードに制限されています:

  • None
  • Read
  • Write
  • Full control

たとえば、Domain Adminsグループに対する読み取り、書き込み、および実行権限を設定するには、Domain Usersグループに対する読み取りおよび実行権限を使用し、/srv/samba/Demo/ディレクトリで他のユーザー全員へのアクセスを拒否します:

  • inherit acls = yesパラメータを、その共有の設定に追加してください。例えば次のように入力してください:
[Demo]
       path = /srv/samba/Demo/
       read only = no
       inherit acls = yes
inherit acls = yesパラメータは拡張ACLのACLの継承を有効にします。詳細は、smb.confのマニュアルページのパラメータの説明を参照してください。
  • Samba をリロード:
# smbcontrol all reload-config
  • ディレクトリが拡張ACLをサポートするファイルシステムに格納されていることを確認します。 詳細については、ファイルシステムのサポートを参照してください。
  • ユーザーアカウントのプライマリグループに対するアクセス許可の自動付与を無効にします:
# setfacl -m group::--- /srv/samba/Demo/
# setfacl -m default:group::--- /srv/samba/Demo/
ディレクトリのプライマリグループは、動的なCREATOR GROUPプリンシパルにさらにマッピングされます。 Samba共有で拡張POSIX ACLを使用する場合、この主体は自動的に追加され、削除することはできません。CREATOR GROUPプリンシパルの詳細については、Well-known security identifiers in Windows operating systemsを参照してください。
  • ディレクトリにアクセス許可を設定:
  • Domain Adminsグループに読み取り、書き込み、および実行権限を付与します:
# setfacl -m group:"SAMDOM\Domain Admins":rwx /srv/samba/Demo/
  • Domain Usersグループに読み取り権限と実行権限を付与します:
# setfacl -m group:"SAMDOM\Domain Users":r-x /srv/samba/Demo/
  • 他のACLエントリと一致しないユーザーへのアクセスを拒否するには、other ACLエントリにアクセス許可を設定します:
# setfacl -R -m other::--- /srv/samba/Demo/
これらの設定はディレクトリ自体にのみ適用されます。 Windowsでは、これはこのフォルダのみに変換されます。
  • 前の手順で設定したのと同じ権限が、このディレクトリに作成された新しいファイルシステムオブジェクトに継承されるように設定するには、次のように入力します:
# setfacl -m default:group:"SAMDOM\Domain Admins":rwx /srv/samba/Demo/
# setfacl -m default:group:"SAMDOM\Domain Users":r-x /srv/samba/Demo/
# setfacl -m default:other::--- /srv/samba/Demo/
この設定で、プリンシパルに対するこのフォルダのみモードがこのフォルダ、サブフォルダおよびファイルに変更されます。

前の手順で設定したACLは、次のWindows ACLにマッピングされます:

Principal Access Applies to Comments
SAMDOM\Domain Admins Full control This folder, subfolders, and files
SAMDOM\Domain Users Read & execute This folder, subfolders, and files
Everyone None This folder, subfolders, and files Samba maps the permissions for this principal from the UNIX other ACL entry.
directory_owner (Unix User\directory_owner) * Full control This folder only Samba maps the owner of the directory to this entry.
directory_primary_group (Unix User\directory_primary_group) * None This folder only Samba maps the primary group of the directory to this entry.
CREATOR OWNER * Full control Subfolders and files only On new file system objects, the creator inherits automatically the permissions of this principal.
CREATOR GROUP * None Subfolders and files only On new file system objects, the creator's primary group inherits automatically the permissions of this principal.

* これらのプリンシパルをACLから構成または削除することは、Windows ACLを使用している場合にのみサポートされます。 詳細については、Windows ACLs を利用して共有を設定するを参照してください。

詳しくは、setfaclのマニュアルページを参照してください。

共有権限を設定する

オプション: Sambaはユーザーが接続したときに検証される各共有に許可を設定することを可能にします。

共有上のコンテンツへのアクセスは、ファイルシステムのアクセス制御リスト(ACL)を使用して制御されます。 詳細は、 Samba共有へのPOSIX ACLの設定を参照してください。



ユーザーおよびグループベースの共有アクセスを構成する

共有ベースのアクセス制御を使用すると、特定のユーザーおよびグループに対して共有へのアクセスを許可または拒否することができます。 たとえば、example_userアカウントへのアクセスが拒否されている間にDomain Usersグループのすべてのメンバーが共有にアクセスできるようにするには、共有の設定に次のパラメータを追加します。:

       valid users = +SAMDOM\"Domain Users"
       invalid users = SAMDOM\example_user

invalid usersパラメータは、valid usersパラメータよりも優先度が高くなります。 たとえば、example_userアカウントがDomain Usersグループのメンバーである場合、前の例ではこのアカウントへのアクセスは拒否されています。

詳しくは、smb.conf(5)のマニュアルページのパラメータの説明を参照してください。


ホストベースの共有アクセスの設定

ホストベースのアクセス制御を使用すると、ホスト名、IPアドレス、またはIP範囲に基づいて共有へのアクセスを許可または拒否できます。 たとえば、127.0.0.1のIPアドレス、10.99.0.0 / 24のIP範囲、およびGoodHostのホスト名で共有にアクセスし、さらにホスト名がBadHostのアクセスを拒否するには、共有の設定に次のパラメータを追加します:

       hosts allow = 127.0.0.1 10.99.0.0/24 GoodHost
       hosts deny = BadHost

hosts denyパラメータはhosts allowパラメータより高い優先順位を持ちます。 たとえば、BadHosthosts allowパラメータに記載されているIPアドレスで解決された場合でも、このホストへのアクセスは拒否されます。


For further details, see the parameter descriptions in the smb.conf(5) man page.