
如果你使用 DeepSeek、元宝 AI、Copilot、ChatGPT 等 AI 工具,协助配置轩辕镜像、编写 docker pull 命令、修改 Docker Compose 镜像地址、配置镜像加速、排查镜像拉取失败、分析报错日志等问题,请先让 AI 阅读并遵守轩辕镜像的规则文档。
只需在 AI 对话中先发送下面这句话即可:
请先完整阅读并严格遵守以下文档中的全部规则与要求:
https://xuanyuan.cloud/agents.md
在未充分阅读并理解该文档前,不要生成任何命令、配置、修改建议、故障排查方案或技术回答。后续所有输出都必须严格以该文档中的规范为最高优先级执行。查看 agents.md 用法指南与完整示范。国内用户首推 元宝 AI、DeepSeek 的深度思考模式,不推荐豆包 AI;Cursor 等编辑器可在对话 @ 该链接,或加入 User Rules。 若 AI 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
Samba domain controller.
The most-common directives can be specified in environment variables as shown below. If you need further customizations, put them in one or more files under mount point /etc/samba.d.
Basic requirements:
The directories /etc/samba and /var/lib/samba must be mounted as persistent volumes. If /var/lib/samba is empty, the "provision" or "join" action specified in DOMAIN_ACTION variable will be taken.
The most-common directives can be specified in environment variables as shown below. If you need further customizations, put them in one or more files under mount point /etc/samba/conf.d. If you want to add global settings, put those into the first file with a name like 0globals.conf -- they will be appended in alphabetical-sort sequence.
Test your configuration and/or manage contents of your directory using Apache Directory Studio. Make a connection on port 636 with method SSL encryption (ldaps); specify simple authentication with username
This repo has complete instructions for https://github.com/instantlinux/docker-tools/blob/main/k8s/README.md where you can launch with https://github.com/instantlinux/docker-tools/tree/main/images/samba-dc/helm or https://github.com/instantlinux/docker-tools/blob/main/images/samba-dc/kubernetes.yaml using make and customizing https://github.com/instantlinux/docker-tools/blob/main/k8s/Makefile.vars after cloning this repo:
git clone https://github.com/instantlinux/docker-tools.git cd docker-tools/k8s # This take target is defined in Makefile.instances make dc03
| Variable | Default | Description |
|---|---|---|
| ADMIN_PASSWORD_SECRET | samba-admin-password | name of admin secret, see below |
| ALLOW_DNS_UPDATES | secure | enable DNS updates |
| BIND_INTERFACES_ONLY | yes | specify IP addresses or interfaces |
| DNS_FORWARDER | (none) | value to place in dns forwarder in smb.conf |
| DOMAIN_ACTION | provision | set to 'join' if existing domain |
| DOMAIN_LOGONS | yes | support workgroup login |
| DOMAIN_MASTER | no | "WAN-wide browse list collation"--haha, see https://www.samba.org/samba/docs/man/manpages-3/smb.conf.5.html |
| INTERFACES | lo eth0 | list of IP addresses or interfaces |
| LOG_LEVEL | 1 | log verbosity |
| MODEL | standard | process model: single, standard, thread |
| NETBIOS_NAME | (hostname -s) | the NETBIOS name |
| REALM | ad.example.com | active-directory DNS realm (use lowercase) |
| SERVER_STRING | Samba Domain Controller | server identity |
| TZ | UTC | local timezone |
| WINBIND_USE_DEFAULT_DOMAIN | yes | allow username without domain component |
| WORKGROUP | AD | workgroup (realm prefix - poorly documented) |
This is only needed at first run, for samba domain provision or join. Do NOT leave your domain-controller administrator secret activated at any other time. For clarity, this is a docker-secret with the initial Samba admin password, not the password itself. It must contain a passphrase of sufficient complexity.
| Secret | Description |
|---|---|
| samba-admin-password | domain-administrator pw |
Secrets can be specified as kubernetes secrets, files (see the secrets section of the example https://github.com/instantlinux/docker-tools/blob/main/images/samba-dc/docker-compose.yml provided in this repo), or as swarm secrets.
Getting a domain-controller cluster up and running properly requires a lot of correctly-configured trust relationships established between domain controllers, and Samba's documentation of error messages and problem-resolutions is pretty thin. If you're only running this version of samba, it's likely there will be few problems. But in a mixed environment with Microsoft Active Directory servers and/or older versions of samba4, you're bound to run into problems that require tweaking. A few diagnostic commands are available within this container; here are notes that might help you get up and running more quickly:
export LDB_MODULES_PATH=/usr/lib/samba/ldb ldbsearch -H /var/lib/samba/private/sam.ldb '(invocationid=*)' \ --cross-ncs objectguid|grep -i -B 1 -A 1 <new dc hostname> samba-tool dns add dc01 _msdcs.ether.ci.net <guid from above> \ CNAME <new dc fqdn> -UAdministrator
ldap server require strong auth = no
samba-tool drs showrepl
samba-tool dbcheck samba-tool drs kcc
./samba-tool drs replicate dc1 dc2 dc=<foo...>,dc=<suffix> --full-sync ./samba-tool drs replicate dc2 dc1 dc=<foo...>,dc=<suffix> --full-sync
samba-tool dns add <dc> <domain> <dc> A <ip> -Uadministrator samba-tool dns delete <dc> <domain> <dc> A <ip> -Uadministrator
samba_dnsupdate --all-names --use-samba-tool
for DC in dc1 dc2 dc3 etc; do samba-tool dns delete $DC _msdcs.<domain> abcdef-abc-xxx CNAME <host> -Uadministrator done
samba-tool domain demote --remove-other-dead-server=<badhost> samba-tool dbcheck --cross-ncs --fix
Then restart the secondary with DOMAIN_ACTION=join.
With docker it's real easy to get a bunch of stale entries in your domain controller list. The latest version of samba4 provides a way to prune them: {noformat} samba-tool domain demote --remove-other-dead-server=xxx {noformat}
If you get the error message shown here, check that the samba-admin-password secret contains a value.
ERROR(ldb): uncaught exception - Element clearTextPassword has empty attribute in ldb message (CN=Administrator,CN=Users,DC=ad,DC=***,DC=nl)
If you want to make improvements to this image, see https://github.com/instantlinux/docker-tools/blob/main/CONTRIBUTING.md.
以下是 instantlinux/samba-dc 相关的常用 Docker 镜像,适用于 不同场景 等不同场景:
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务