Comments (13)
This is indeed a bug in the init.sh script: By default, it adds the containers default DNS resolver, which is the docker DNS resolver. If DNSFORWARDER is set, it replaces
[global]
with
[global] dns forwarder = ....
But the culprit is, that another entry of "dns forwarder" is yet down the lines of the CFG, which will nullify the settings above and thus default back to the containers DNS resolver.
In order to fix this, init.sh only needs this additional line being added after
Line 69 in 49d3588
sed -i "/dns forwarder/d" /etc/samba/smb.conf
This will first delete every single occurance of "dns forwarder" being generated by the previous commands, before adding the "dns forwarder" stated in the env DNSFORWARDER
from samba-domain.
Hi @tbs575
I've had a similar problem, then looking at the config file at /var/lib/samba/config/samba/
I noticed the setting was being overridden at some point
[global]
dns forwarder = 10.109.50.22
idmap_ldb:use rfc2307 = yes
wins support = yes
server role = active directory domain controller
dns forwarder = 127.0.0.11 # <--- redefinition
It worked after I comment out the second definition.
from samba-domain.
Hi @tbs575
I've had a similar problem, then looking at the config file at
/var/lib/samba/config/samba/
I noticed the setting was being overridden at some point[global] dns forwarder = 10.109.50.22 idmap_ldb:use rfc2307 = yes wins support = yes server role = active directory domain controller dns forwarder = 127.0.0.11 # <--- redefinition
It worked after I comment out the second definition.
Had the same issue but in /etc/smb.conf
from samba-domain.
@meatsac @tbs575 Are either of you using an external config? Can you send in your compose file? I think this may be related to the cp
issue, or it's getting replaced on provision.
from samba-domain.
I can confirm same thing (dns forwarder written twice). Here is my docker-compose.yml:
version: '2'
networks:
samba-pdc:
external: true
services:
samba:
image: samba-domain:latest
container_name: samba-dc
volumes:
- /etc/localtime:/etc/localtime:ro
- ./data/:/var/lib/samba
- ./config/:/etc/samba/external
environment:
- DOMAIN=TEST.LOCAL
- NOCOMPLEXITY=true
- DOMAINPASS=test123
- DNSFORWARDER=8.8.8.8
- HOSTIP=192.168.100.2
networks:
- samba-pdc
ports:
- 192.168.100.2:53:53
- 192.168.100.2:53:53/udp
- 192.168.100.2:88:88
- 192.168.100.2:88:88/udp
- 192.168.100.2:135:135
- 192.168.100.2:137-138:137-138/udp
- 192.168.100.2:139:139
- 192.168.100.2:389:389
- 192.168.100.2:389:389/udp
- 192.168.100.2:445:445
- 192.168.100.2:464:464
- 192.168.100.2:464:464/udp
- 192.168.100.2:636:636
- 192.168.100.2:1024-1044:1024-1044
- 192.168.100.2:3268-3269:3268-3269
dns_search:
- test.local
dns:
- 192.168.100.2
- 192.168.100.1
extra_hosts:
- dc.test.local:192.168.100.2
hostname: dc
cap_add:
- NET_ADMIN
devices:
- /dev/net/tun
privileged: true
restart: always
from samba-domain.
Me too, dns forwarder twice in the external smb.conf, with two different values. However - for me, commenting the second entry doesn't change behavior.
Getting shell into the container shows the issue exists in /etc/samba/smb.conf and /etc/samba/external/smb.conf. I have external mapped as a volume and was correcting the external version, but it wasn't being copied over. I manually copied it over in the container, and now we're forwarding.
from samba-domain.
How can I fix this permanently? Wich one to edit and were I see 3 smb.conf locations in this thread xD
from samba-domain.
How can I fix this my setup just isn’t Forward queries that can not be answered from own zones.
Cant resolve example bing.com somehow
from samba-domain.
Okee I remove the second entry only in sed -i "/dns forwarder = dcipaddress" /etc/samba/smb.conf and changed the smb.conf in the samba/config/samba/smb.conf to the forwarded ip
from samba-domain.
This bug is not resolved yet.
@systemofapwne can you create a PR? is it ok for you if I create it?
from samba-domain.
This bug is not resolved yet.
@systemofapwne can you create a PR? is it ok for you if I create it?
Please create a PR yourself. I am not using this container anymore, since it gave me too much headaches and was using an outdated Samba version for quite some time. I fully migrated to a VM running Univention UCS for my AD.
from samba-domain.
This is still unfixed.
from samba-domain.
This is still unfixed.
First of all, try develop branch. Many issues are "solved" there. Master is quite outdated and full of bugs. I don't know the reason though, why maintainer has not merged it to master.
from samba-domain.
Related Issues (20)
- Any specific reason why "extnet" is present in the docker-compose examples but not in normal docker examples? HOT 6
- Cannot connect using ldapsearch HOT 2
- Have rsync based sysvol share replication from existing dc on join
- Setting Active Directory site does not properly update dns entries
- Adding secondary DC with JOIN does not add expected DNS entries HOT 3
- Windows clients not registering in DNS HOT 6
- Help: docker samba service client HOT 1
- is this project still alive? HOT 9
- split into latest / latest-multisite
- Roadmap 1.0 HOT 7
- add ENV 'URDOMAIN' to set diverging NETBIOS domain name
- cannot build 'develop' branch HOT 2
- DNS sockets exhausting system HOT 5
- Stopped working after update to latest image version HOT 1
- NTP errors HOT 1
- Beginners question - getting started HOT 5
- Bug: Supervisord Error and Warning
- Unable to create files on samba share from linux AD client
- Several errors when running as instructed HOT 1
- [Question] Where to place domain.sh?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from samba-domain.