見出し画像

Appendix samba-toolコマンド

Samba3のsamba-toolコマンド

samba-toolはActiveDirectoryドメインコントローラーを管理するためのコマンドなので、NTドメイン対応のSamba3にはsamba-toolコマンドが含まれていない。

[root@rocky9-samba31 ~]#
[root@rocky9-samba31 ~]# samba-tool
bash: samba-tool: コマンドが見つかりません
[root@rocky9-samba31 ~]#

Samba4のsamba-toolコマンド

(補足)
Samba4にはディストリビューションのパッケージ管理システム(dnf/yum/aptなど)でインストールするものと、ソースからインストールするものでは機能に差があるので注意。
例えば、RockyLinux9の場合パッケージでインストールできるSamba4はActiveDirectoryドメインに参加することはできるが、ドメインコントローラーになるための機能が含まれていない。 これは以下 samba-tool domain コマンドのコマンドオプションに差異がある要因といえる。

Samba4 samba-tool 日本語訳

[root@rocky9-samba41 ~]#
[root@rocky9-samba41 ~]# samba-tool --version
4.17.5
[root@rocky9-samba41 ~]#
[root@rocky9-samba41 ~]# samba-tool --help
Usage: samba-tool <subcommand>

Main samba administration tool.


Options:
  -h, --help       show this help message and exit

  Version Options:
    -V, --version  Display version number


Available subcommands:
  computer    - Computer management.
  contact     - Contact management.
  dbcheck     - Check local AD database for errors.
  delegation  - Delegation management.
  dns         - Domain Name Service (DNS) management.
  domain      - Domain management.
  drs         - Directory Replication Services (DRS) management.
  dsacl       - DS ACLs manipulation.
  forest      - Forest management.
  fsmo        - Flexible Single Master Operations (FSMO) roles management.
  gpo         - Group Policy Object (GPO) management.
  group       - Group management.
  ldapcmp     - Compare two ldap databases.
  ntacl       - NT ACLs manipulation.
  ou          - Organizational Units (OU) management.
  processes   - List processes (to aid debugging on systems without setproctitle).
  rodc        - Read-Only Domain Controller (RODC) management.
  schema      - Schema querying and management.
  sites       - Sites management.
  spn         - Service Principal Name (SPN) management.
  testparm    - Syntax check the configuration file.
  time        - Retrieve the time on a server.
  user        - User management.
  visualize   - Produces graphical representations of Samba network state.
For more help on a specific subcommand, please type: samba-tool <subcommand> (-h|--help)

[root@rocky9-samba41 ~]#

samba-tool user

RockyLinux9 + samba4(パッケージインストール)

[root@rocky9-samba41 ~]#
[root@rocky9-samba41 ~]# samba-tool user --help
Usage: samba-tool user <subcommand>

User management.


Options:
  -h, --help  show this help message and exit


Available subcommands:
  add              - Add a new user.
  addunixattrs     - Add RFC2307 attributes to a user.
  create           - Add a new user.
  delete           - Delete a user.
  disable          - Disable a user.
  edit             - Modify User AD object.
  enable           - Enable a user.
  getgroups        - Get the direct group memberships of a user account.
  getpassword      - Get the password fields of a user/computer account.
  list             - List all users.
  move             - Move a user to an organizational unit/container.
  password         - Change password for a user account (the one provided in authentication).
  rename           - Rename a user and related attributes.
  sensitive        - Set/unset or show UF_NOT_DELEGATED for an account.
  setexpiry        - Set the expiration of a user account.
  setpassword      - Set or reset the password of a user account.
  setprimarygroup  - Set the primary group a user account.
  show             - Display a user AD object.
  syncpasswords    - Sync the password of user accounts.
  unlock           - Unlock a user account.
For more help on a specific subcommand, please type: samba-tool user <subcommand> (-h|--help)

[root@rocky9-samba41 ~]#

RockyLinux9 + samba4(ソースインストール)

[root@rocky9-samba42 ~]#
[root@rocky9-samba42 ~]# samba-tool user --help
samba-tool user: missing subcommand

Usage: samba-tool user <subcommand>

User management.


Options:
  -h, --help            show this help message and exit
  --color=always|never|auto
                        use colour if available (default: auto)


Available subcommands:
  add              - Add a new user.
  addunixattrs     - Add RFC2307 attributes to a user.
  create           - Add a new user.
  delete           - Delete a user.
  disable          - Disable a user.
  edit             - Modify User AD object.
  enable           - Enable a user.
  getgroups        - Get the direct group memberships of a user account.
  getpassword      - Get the password fields of a user/computer account.
  list             - List all users.
  move             - Move a user to an organizational unit/container.
  password         - Change password for a user account (the one provided in authentication).
  rename           - Rename a user and related attributes.
  sensitive        - Set/unset or show UF_NOT_DELEGATED for an account.
  setexpiry        - Set the expiration of a user account.
  setpassword      - Set or reset the password of a user account.
  setprimarygroup  - Set the primary group a user account.
  show             - Display a user AD object.
  syncpasswords    - Sync the password of user accounts.
  unlock           - Unlock a user account.
For more help on a specific subcommand, please type: samba-tool user <subcommand> (-h|--help)

[root@rocky9-samba42 ~]#

samba-tool group

RockyLinux9 + samba4(パッケージインストール)

[root@rocky9-samba41 ~]#
[root@rocky9-samba41 ~]# samba-tool group --help
Usage: samba-tool group <subcommand>

Group management.


Options:
  -h, --help  show this help message and exit


Available subcommands:
  add            - Creates a new AD group.
  addmembers     - Add members to an AD group.
  addunixattrs   - Add RFC2307 attributes to a group.
  create         - Creates a new AD group.
  delete         - Deletes an AD group.
  edit           - Modify Group AD object.
  list           - List all groups.
  listmembers    - List all members of an AD group.
  move           - Move a group to an organizational unit/container.
  removemembers  - Remove members from an AD group.
  rename         - Rename a group and related attributes.
  show           - Display a group AD object.
  stats          - Summary statistics about group memberships.
For more help on a specific subcommand, please type: samba-tool group <subcommand> (-h|--help)

[root@rocky9-samba41 ~]#

RockyLinux9 + samba4(ソースインストール)

[root@rocky9-samba42 ~]#
[root@rocky9-samba42 ~]# samba-tool group --help
samba-tool group: missing subcommand

Usage: samba-tool group <subcommand>

Group management.


Options:
  -h, --help            show this help message and exit
  --color=always|never|auto
                        use colour if available (default: auto)


Available subcommands:
  add            - Creates a new AD group.
  addmembers     - Add members to an AD group.
  addunixattrs   - Add RFC2307 attributes to a group.
  create         - Creates a new AD group.
  delete         - Deletes an AD group.
  edit           - Modify Group AD object.
  list           - List all groups.
  listmembers    - List all members of an AD group.
  move           - Move a group to an organizational unit/container.
  removemembers  - Remove members from an AD group.
  rename         - Rename a group and related attributes.
  show           - Display a group AD object.
  stats          - Summary statistics about group memberships.
For more help on a specific subcommand, please type: samba-tool group <subcommand> (-h|--help)

[root@rocky9-samba42 ~]#

samba-tool computer

RockyLinux9 + samba4(パッケージインストール)

[root@rocky9-samba41 ~]#
[root@rocky9-samba41 ~]# samba-tool computer --help
Usage: samba-tool computer <subcommand>

Computer management.


Options:
  -h, --help  show this help message and exit


Available subcommands:
  add     - Add a new computer.
  create  - Add a new computer.
  delete  - Delete a computer.
  edit    - Modify Computer AD object.
  list    - List all computers.
  move    - Move a computer to an organizational unit/container.
  show    - Display a computer AD object.
For more help on a specific subcommand, please type: samba-tool computer <subcommand> (-h|--help)

[root@rocky9-samba41 ~]#

RockyLinux9 + samba4(ソースインストール)

[root@rocky9-samba42 ~]#
[root@rocky9-samba42 ~]# samba-tool computer --help
samba-tool computer: missing subcommand

Usage: samba-tool computer <subcommand>

Computer management.


Options:
  -h, --help            show this help message and exit
  --color=always|never|auto
                        use colour if available (default: auto)


Available subcommands:
  add     - Add a new computer.
  create  - Add a new computer.
  delete  - Delete a computer.
  edit    - Modify Computer AD object.
  list    - List all computers.
  move    - Move a computer to an organizational unit/container.
  show    - Display a computer AD object.
For more help on a specific subcommand, please type: samba-tool computer <subcommand> (-h|--help)

[root@rocky9-samba42 ~]#

samba-tool domain

RockyLinux9 + samba4(パッケージインストール)

[root@rocky9-samba41 ~]#
[root@rocky9-samba41 ~]# samba-tool domain --help
Usage: samba-tool domain <subcommand>

Domain management.


Options:
  -h, --help  show this help message and exit


Available subcommands:
  info   - Print basic info about a domain and the DC passed as parameter.
  join   - Join domain as either member or backup domain controller.
  leave  - Cause a domain member to leave the joined domain.
For more help on a specific subcommand, please type: samba-tool domain <subcommand> (-h|--help)

[root@rocky9-samba41 ~]#

RockyLinux9 + samba4(ソースインストール)

[root@rocky9-samba42 ~]#
[root@rocky9-samba42 ~]# samba-tool domain --help
samba-tool domain: missing subcommand

Usage: samba-tool domain <subcommand>

Domain management.


Options:
  -h, --help            show this help message and exit
  --color=always|never|auto
                        use colour if available (default: auto)


Available subcommands:
  backup            - Create or restore a backup of the domain.
  classicupgrade    - Upgrade from Samba classic (NT4-like) database to Samba AD DC database.
  dcpromo           - Promote an existing domain member or NT4 PDC to an AD DC.
  demote            - Demote ourselves from the role of Domain Controller.
  exportkeytab      - Dump Kerberos keys of the domain into a keytab.
  functionalprep    - Domain functional level preparation
  info              - Print basic info about a domain and the DC passed as parameter.
  join              - Join domain as either member or backup domain controller.
  leave             - Cause a domain member to leave the joined domain.
  level             - Raise domain and forest function levels.
  passwordsettings  - Manage password policy settings.
  provision         - Provision a domain.
  schemaupgrade     - Domain schema upgrading
  tombstones        - Domain tombstone and recycled object management.
  trust             - Domain and forest trust management.
For more help on a specific subcommand, please type: samba-tool domain <subcommand> (-h|--help)

[root@rocky9-samba42 ~]#

samba-tool dns

RockyLinux9 + samba4(パッケージインストール)

[root@rocky9-samba41 ~]#
[root@rocky9-samba41 ~]# samba-tool dns --help
samba-tool dns: missing subcommand

Usage: samba-tool dns <subcommand>

Domain Name Service (DNS) management.


Options:
  -h, --help            show this help message and exit
  --color=always|never|auto
                        use colour if available (default: auto)


Available subcommands:
  add          - Add a DNS record
  cleanup      - Cleanup DNS records for a DNS host.
  delete       - Delete a DNS record
  query        - Query a name.
  roothints    - Query root hints.
  serverinfo   - Query for Server information.
  update       - Update a DNS record
  zonecreate   - Create a zone.
  zonedelete   - Delete a zone.
  zoneinfo     - Query for zone information.
  zonelist     - Query for zones.
  zoneoptions  - Change zone aging options.
For more help on a specific subcommand, please type: samba-tool dns <subcommand> (-h|--help)

[root@rocky9-samba41 ~]#

RockyLinux9 + samba4(ソースインストール)

[root@rocky9-samba41 ~]#
[root@rocky9-samba41 ~]# samba-tool dns --help
samba-tool dns: missing subcommand

Usage: samba-tool dns <subcommand>

Domain Name Service (DNS) management.


Options:
  -h, --help            show this help message and exit
  --color=always|never|auto
                        use colour if available (default: auto)


Available subcommands:
  add          - Add a DNS record
  cleanup      - Cleanup DNS records for a DNS host.
  delete       - Delete a DNS record
  query        - Query a name.
  roothints    - Query root hints.
  serverinfo   - Query for Server information.
  update       - Update a DNS record
  zonecreate   - Create a zone.
  zonedelete   - Delete a zone.
  zoneinfo     - Query for zone information.
  zonelist     - Query for zones.
  zoneoptions  - Change zone aging options.
For more help on a specific subcommand, please type: samba-tool dns <subcommand> (-h|--help)

[root@rocky9-samba41 ~]#


この記事が気に入ったらサポートをしてみませんか?