SAMBA4 API

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

SAMBA4 API

Samba - General mailing list
I am looking for a way to programatically modify DNS settings from outside
of my SAMBA4 DCs.

I am working on creating a PHP inventory page, which (in an ideal world)
would hook into our SAMBA4 domain controllers, allowing us to modify DNS
records in the inventory, and then have the backend of the inventory
communicate with the DCs over an API and modify the DNS on the DCs.

Is it possible that this is something that already exists, or am I going to
have to build my own API from scratch?

Thanks in advance for any assistance you can provide!

--
*Taylor Hammerling* |  *IT Manager*
2800 Laura Lane | Middleton, WI 53562
*O *(608) 669-9070 *| C *(608) 512-7849
tcsbasys.com | ubiquistat.com
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba
Reply | Threaded
Open this post in threaded view
|

Re: SAMBA4 API

Samba - General mailing list
On Mon, 13 Nov 2017 11:07:28 -0600
Taylor Hammerling via samba <[hidden email]> wrote:

> I am looking for a way to programatically modify DNS settings from
> outside of my SAMBA4 DCs.
>
> I am working on creating a PHP inventory page, which (in an ideal
> world) would hook into our SAMBA4 domain controllers, allowing us to
> modify DNS records in the inventory, and then have the backend of the
> inventory communicate with the DCs over an API and modify the DNS on
> the DCs.

It depends on what you mean by 'modify' ??
Whatever you mean, you only need to 'modify' the records on one DC,
replication will take care of the rest.

Rowland


--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba
Reply | Threaded
Open this post in threaded view
|

Re: SAMBA4 API

Samba - General mailing list
by modify I mean add, change and/or remove DNS records (depending on the
values passed to the API).
Also, yes I mispoke, we would only be modifying the records on one DC, and
replication would take care of the rest.

On Mon, Nov 13, 2017 at 11:17 AM, Rowland Penny via samba <
[hidden email]> wrote:

> On Mon, 13 Nov 2017 11:07:28 -0600
> Taylor Hammerling via samba <[hidden email]> wrote:
>
> > I am looking for a way to programatically modify DNS settings from
> > outside of my SAMBA4 DCs.
> >
> > I am working on creating a PHP inventory page, which (in an ideal
> > world) would hook into our SAMBA4 domain controllers, allowing us to
> > modify DNS records in the inventory, and then have the backend of the
> > inventory communicate with the DCs over an API and modify the DNS on
> > the DCs.
>
> It depends on what you mean by 'modify' ??
> Whatever you mean, you only need to 'modify' the records on one DC,
> replication will take care of the rest.
>
> Rowland
>
>
> --
> To unsubscribe from this list go to the following URL and read the
> instructions:  https://lists.samba.org/mailman/options/samba
>



--
*Taylor Hammerling* |  *IT Manager*
2800 Laura Lane | Middleton, WI 53562
*O *(608) 669-9070 *| C *(608) 512-7849
tcsbasys.com | ubiquistat.com
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba
Reply | Threaded
Open this post in threaded view
|

Re: SAMBA4 API

Samba - General mailing list
On Tue, 14 Nov 2017 11:18:04 -0600
Taylor Hammerling <[hidden email]> wrote:

> by modify I mean add, change and/or remove DNS records (depending on
> the values passed to the API).
> Also, yes I mispoke, we would only be modifying the records on one
> DC, and replication would take care of the rest.
>

OK, rather than trying to re-invent the wheel, you will probably find
it easier to script around the 'nsupdate' utility from Bind.

If you look here, you will find a bash script that uses it:

https://wiki.samba.org/index.php/Configure_DHCP_to_update_DNS_records_with_BIND9

There is also the samba_dnsupdate python script that uses it.

Rowland

--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba
Reply | Threaded
Open this post in threaded view
|

Re: SAMBA4 API

Samba - General mailing list
We aren't using BIND, we are using the builtin SAMBA backend.  Also the
requests for updates are going to come from external to the DC.  IE, the
inventory server needs to send a request to the DC to add/update/remove etc
DNS records.  This is why I'm looking for an API.

On Tue, Nov 14, 2017 at 11:32 AM, Rowland Penny via samba <
[hidden email]> wrote:

> On Tue, 14 Nov 2017 11:18:04 -0600
> Taylor Hammerling <[hidden email]> wrote:
>
> > by modify I mean add, change and/or remove DNS records (depending on
> > the values passed to the API).
> > Also, yes I mispoke, we would only be modifying the records on one
> > DC, and replication would take care of the rest.
> >
>
> OK, rather than trying to re-invent the wheel, you will probably find
> it easier to script around the 'nsupdate' utility from Bind.
>
> If you look here, you will find a bash script that uses it:
>
> https://wiki.samba.org/index.php/Configure_DHCP_to_update_
> DNS_records_with_BIND9
>
> There is also the samba_dnsupdate python script that uses it.
>
> Rowland
>
> --
> To unsubscribe from this list go to the following URL and read the
> instructions:  https://lists.samba.org/mailman/options/samba
>



--
*Taylor Hammerling* |  *IT Manager*
2800 Laura Lane | Middleton, WI 53562
*O *(608) 669-9070 *| C *(608) 512-7849
tcsbasys.com | ubiquistat.com
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba
Reply | Threaded
Open this post in threaded view
|

Re: SAMBA4 API

Samba - General mailing list
On Tue, 14 Nov 2017 11:48:29 -0600
Taylor Hammerling <[hidden email]> wrote:

> We aren't using BIND, we are using the builtin SAMBA backend.  Also
> the requests for updates are going to come from external to the DC.
> IE, the inventory server needs to send a request to the DC to
> add/update/remove etc DNS records.  This is why I'm looking for an
> API.
>

The samba_dnsupdate script doesn't need Bind either.

You could always script around the 'samba-tool dns' commands, see
'samba-tool dns --help'

Samba is written using 'C' and the tools are mostly written in Python,
there isn't an easily findable API that I am aware of.

What I am trying to say is, why make things hard for yourself ? If you
are going to be using PHP, you can make this run other scripts that run
nsupdate.

Where are the updates going to come from ?

Rowland

--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba
Reply | Threaded
Open this post in threaded view
|

Re: SAMBA4 API

Samba - General mailing list
From the inventory server, which is a separate server from the DC.  it's a
FOG server which has had several additional tables bolted onto the database
and a PHP inventory page added to it.

On Tue, Nov 14, 2017 at 12:05 PM, Rowland Penny via samba <
[hidden email]> wrote:

> On Tue, 14 Nov 2017 11:48:29 -0600
> Taylor Hammerling <[hidden email]> wrote:
>
> > We aren't using BIND, we are using the builtin SAMBA backend.  Also
> > the requests for updates are going to come from external to the DC.
> > IE, the inventory server needs to send a request to the DC to
> > add/update/remove etc DNS records.  This is why I'm looking for an
> > API.
> >
>
> The samba_dnsupdate script doesn't need Bind either.
>
> You could always script around the 'samba-tool dns' commands, see
> 'samba-tool dns --help'
>
> Samba is written using 'C' and the tools are mostly written in Python,
> there isn't an easily findable API that I am aware of.
>
> What I am trying to say is, why make things hard for yourself ? If you
> are going to be using PHP, you can make this run other scripts that run
> nsupdate.
>
> Where are the updates going to come from ?
>
> Rowland
>
> --
> To unsubscribe from this list go to the following URL and read the
> instructions:  https://lists.samba.org/mailman/options/samba
>



--
*Taylor Hammerling* |  *IT Manager*
2800 Laura Lane | Middleton, WI 53562
*O *(608) 669-9070 *| C *(608) 512-7849
tcsbasys.com | ubiquistat.com
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba
Reply | Threaded
Open this post in threaded view
|

Re: SAMBA4 API

Samba - General mailing list
On Tue, 14 Nov 2017 13:10:20 -0600
Taylor Hammerling <[hidden email]> wrote:

> From the inventory server, which is a separate server from the DC.
> it's a FOG server which has had several additional tables bolted onto
> the database and a PHP inventory page added to it.
>

Not sure I understand just what you are trying to do here, but isn't a
FOG server a way of creating multiple computers from the same image,
then making them individual by configuring the hostname etc. You can
then join them to the AD domain, at which point windows machines can
update their own records in AD.

Rowland

--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba
Reply | Threaded
Open this post in threaded view
|

Re: SAMBA4 API

Samba - General mailing list
Rowland -

The fog server is an imaging server, and had 90% of the information we
wanted to track by virtue of the end user machines being registered with
it, which is why we are using it as the base for our inventory server.
We simply added on a couple of tables to add the ability to store some
information that FOG didn't natively store.  The inventory is going to
store WAY more than just our end user machines.  It will store information
on all our network devices (printers, APs, routers, firewalls, etc etc) as
well as servers which aren't registered with FOG, which is why it is
important to have the inventory page be able to interface with the SAMBA4
DNS server.

You have answered my question.

I asked "Is there an API to allow me to modify DNS records from a server
external to the DC"

you replied "not to my knowledge"

We're good :D  Thanks for your help!

On Tue, Nov 14, 2017 at 1:32 PM, Rowland Penny via samba <
[hidden email]> wrote:

> On Tue, 14 Nov 2017 13:10:20 -0600
> Taylor Hammerling <[hidden email]> wrote:
>
> > From the inventory server, which is a separate server from the DC.
> > it's a FOG server which has had several additional tables bolted onto
> > the database and a PHP inventory page added to it.
> >
>
> Not sure I understand just what you are trying to do here, but isn't a
> FOG server a way of creating multiple computers from the same image,
> then making them individual by configuring the hostname etc. You can
> then join them to the AD domain, at which point windows machines can
> update their own records in AD.
>
> Rowland
>
> --
> To unsubscribe from this list go to the following URL and read the
> instructions:  https://lists.samba.org/mailman/options/samba
>



--
*Taylor Hammerling* |  *IT Manager*
2800 Laura Lane | Middleton, WI 53562
*O *(608) 669-9070 *| C *(608) 512-7849
tcsbasys.com | ubiquistat.com
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba