diff --git a/programs/server/users.xml b/programs/server/users.xml
index d631fbb0f8a..3d95269190b 100644
--- a/programs/server/users.xml
+++ b/programs/server/users.xml
@@ -83,6 +83,9 @@
default
+
+
+
diff --git a/tests/integration/test_authentication/configs/users.d/access_management.xml b/tests/integration/test_authentication/configs/users.d/access_management.xml
new file mode 100644
index 00000000000..7e799cb7b10
--- /dev/null
+++ b/tests/integration/test_authentication/configs/users.d/access_management.xml
@@ -0,0 +1,7 @@
+
+
+
+ 1
+
+
+
diff --git a/tests/integration/test_authentication/test.py b/tests/integration/test_authentication/test.py
index 483b59813e5..b7ffd1ed35b 100644
--- a/tests/integration/test_authentication/test.py
+++ b/tests/integration/test_authentication/test.py
@@ -2,7 +2,7 @@ import pytest
from helpers.cluster import ClickHouseCluster
cluster = ClickHouseCluster(__file__)
-instance = cluster.add_instance('instance')
+instance = cluster.add_instance('instance', config_dir="configs")
@pytest.fixture(scope="module", autouse=True)
diff --git a/tests/integration/test_disk_access_storage/configs/users.d/access_management.xml b/tests/integration/test_disk_access_storage/configs/users.d/access_management.xml
new file mode 100644
index 00000000000..7e799cb7b10
--- /dev/null
+++ b/tests/integration/test_disk_access_storage/configs/users.d/access_management.xml
@@ -0,0 +1,7 @@
+
+
+
+ 1
+
+
+
diff --git a/tests/integration/test_grant_and_revoke/configs/users.d/access_management.xml b/tests/integration/test_grant_and_revoke/configs/users.d/access_management.xml
new file mode 100644
index 00000000000..7e799cb7b10
--- /dev/null
+++ b/tests/integration/test_grant_and_revoke/configs/users.d/access_management.xml
@@ -0,0 +1,7 @@
+
+
+
+ 1
+
+
+
diff --git a/tests/integration/test_grant_and_revoke/configs/users.xml b/tests/integration/test_grant_and_revoke/configs/users.xml
deleted file mode 100644
index fd40c6a4003..00000000000
--- a/tests/integration/test_grant_and_revoke/configs/users.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- ::/0
-
- default
-
-
-
diff --git a/tests/integration/test_quota/configs/users.d/access_management.xml b/tests/integration/test_quota/configs/users.d/access_management.xml
new file mode 100644
index 00000000000..7e799cb7b10
--- /dev/null
+++ b/tests/integration/test_quota/configs/users.d/access_management.xml
@@ -0,0 +1,7 @@
+
+
+
+ 1
+
+
+
diff --git a/tests/integration/test_quota/configs/users.xml b/tests/integration/test_quota/configs/users.xml
index 15a5364449b..4412345a731 100644
--- a/tests/integration/test_quota/configs/users.xml
+++ b/tests/integration/test_quota/configs/users.xml
@@ -12,7 +12,6 @@
default
myQuota
- true
diff --git a/tests/integration/test_row_policy/configs/users.d/access_management.xml b/tests/integration/test_row_policy/configs/users.d/access_management.xml
new file mode 100644
index 00000000000..7e799cb7b10
--- /dev/null
+++ b/tests/integration/test_row_policy/configs/users.d/access_management.xml
@@ -0,0 +1,7 @@
+
+
+
+ 1
+
+
+
diff --git a/tests/integration/test_row_policy/configs/users.xml b/tests/integration/test_row_policy/configs/users.xml
index 313d8084884..ce29b7f7308 100644
--- a/tests/integration/test_row_policy/configs/users.xml
+++ b/tests/integration/test_row_policy/configs/users.xml
@@ -13,7 +13,6 @@
default
default
- true
diff --git a/tests/integration/test_settings_constraints_distributed/configs/remote_servers.xml b/tests/integration/test_settings_constraints_distributed/configs/config.d/remote_servers.xml
similarity index 100%
rename from tests/integration/test_settings_constraints_distributed/configs/remote_servers.xml
rename to tests/integration/test_settings_constraints_distributed/configs/config.d/remote_servers.xml
diff --git a/tests/integration/test_settings_constraints_distributed/configs/users.d/access_management.xml b/tests/integration/test_settings_constraints_distributed/configs/users.d/access_management.xml
new file mode 100644
index 00000000000..7e799cb7b10
--- /dev/null
+++ b/tests/integration/test_settings_constraints_distributed/configs/users.d/access_management.xml
@@ -0,0 +1,7 @@
+
+
+
+ 1
+
+
+
diff --git a/tests/integration/test_settings_constraints_distributed/test.py b/tests/integration/test_settings_constraints_distributed/test.py
index b23b130b270..a58c037a2fc 100644
--- a/tests/integration/test_settings_constraints_distributed/test.py
+++ b/tests/integration/test_settings_constraints_distributed/test.py
@@ -8,9 +8,9 @@ from helpers.test_tools import assert_eq_with_retry
cluster = ClickHouseCluster(__file__)
-node1 = cluster.add_instance('node1')
-node2 = cluster.add_instance('node2')
-distributed = cluster.add_instance('distributed', main_configs=['configs/remote_servers.xml'])
+node1 = cluster.add_instance('node1', config_dir="configs")
+node2 = cluster.add_instance('node2', config_dir="configs")
+distributed = cluster.add_instance('distributed', config_dir="configs")
@pytest.fixture(scope="module")
diff --git a/tests/integration/test_settings_profile/configs/users.d/access_management.xml b/tests/integration/test_settings_profile/configs/users.d/access_management.xml
new file mode 100644
index 00000000000..7e799cb7b10
--- /dev/null
+++ b/tests/integration/test_settings_profile/configs/users.d/access_management.xml
@@ -0,0 +1,7 @@
+
+
+
+ 1
+
+
+
diff --git a/tests/integration/test_settings_profile/test.py b/tests/integration/test_settings_profile/test.py
index 7f18327c66a..6866c6b3901 100644
--- a/tests/integration/test_settings_profile/test.py
+++ b/tests/integration/test_settings_profile/test.py
@@ -2,7 +2,7 @@ import pytest
from helpers.cluster import ClickHouseCluster
cluster = ClickHouseCluster(__file__)
-instance = cluster.add_instance('instance')
+instance = cluster.add_instance('instance', config_dir="configs")
@pytest.fixture(scope="module", autouse=True)
diff --git a/tests/queries/server.py b/tests/queries/server.py
index 185b694619e..ea591c5b123 100644
--- a/tests/queries/server.py
+++ b/tests/queries/server.py
@@ -193,6 +193,8 @@ ServerThread.DEFAULT_USERS_CONFIG = \
default
default
+
+ 1