There's some sintyax available to use, with ldb* tools, multiple ''server'', eg use multiple '-H', or write server in a roud-robin style? Thanks. -- dott. Marco Gaiarin GNUPG Key ID: 240A3D66 Associazione ``La Nostra Famiglia'' http://www.lanostrafamiglia.it/ Polo FVG - Via della Bontà , 7 - 33078 - San Vito al Tagliamento (PN) marco.gaiarin(at)lanostrafamiglia.it t +39-0434-842711 f +39-0434-842797 Dona il 5 PER MILLE a LA NOSTRA FAMIGLIA! http://www.lanostrafamiglia.it/index.php/it/sostienici/5x1000 (cf 00307430132, categoria ONLUS oppure RICERCA SANITARIA)
On Tue, 14 Nov 2017 17:31:15 +0100 Marco Gaiarin via samba <samba at lists.samba.org> wrote:> > There's some sintyax available to use, with ldb* tools, multiple > ''server'', eg use multiple '-H', or write server in a roud-robin > style? > > Thanks. >No, there is no way built into samba-tool to do what you are asking, you will have to script something around samba-tool, something like this: #!/bin/bash ### Get DNS domain DNSDOMAIN=$(hostname -d) # Find DCs FQDN DCS=$(host -t SRV "_ldap._tcp.${DNSDOMAIN}." | awk '{print $NF}') # Exit if no DCs found if [ -z "${DCS}" ]; then echo "Could not find an AD DC." exit 1 fi # Use whichever DC is found first DC=$(echo "$DCS" | head -n 1) # This removes the trailing dot DC="${DC::-1}" echo "Use this DC: $DC" exit 0 Rowland
Mandi! Rowland Penny via samba In chel di` si favelave...> > There's some sintyax available to use, with ldb* tools, multiple > > ''server'', eg use multiple '-H', or write server in a roud-robin > > style? > No, there is no way built into samba-tool to do what you are asking, > you will have to script something around samba-tool, something like > this:...mmmhhhhh... i'm also considering coding some ''script'' around this, but this can be considered a bug? Eg, can i fire up a bug/FR for that? Also: there's, for 'samba-tool' the equivalent '-P' options of ldb* tools, eg, auth with kerberos machine pass? I've tried a but, bit with no luck. Thanks. -- dott. Marco Gaiarin GNUPG Key ID: 240A3D66 Associazione ``La Nostra Famiglia'' http://www.lanostrafamiglia.it/ Polo FVG - Via della Bontà , 7 - 33078 - San Vito al Tagliamento (PN) marco.gaiarin(at)lanostrafamiglia.it t +39-0434-842711 f +39-0434-842797 Dona il 5 PER MILLE a LA NOSTRA FAMIGLIA! http://www.lanostrafamiglia.it/index.php/it/sostienici/5x1000 (cf 00307430132, categoria ONLUS oppure RICERCA SANITARIA)