On Sunday 30 Apr 2006 21:26, Robin Bowes wrote:
> WARNING - EXTREMELY RAW PATCH AHEAD

wow, all sorts going on here ;-)

Here is how I set up my default records, pulled from phpmyadmin and edited to 
suit:

host                                type    val
hostmaster.DOMAIN:ns1.example.com   S       16384:2048:1048576:2560
www.DOMAIN                          A       1.2.3.4
ftp.DOMAIN                          A       1.2.3.4
mail.DOMAIN                         A       1.2.3.4
webmail.DOMAIN                      A       1.2.3.4
DOMAIN                              A       1.2.3.4
DOMAIN                              N       ns1.example.com
DOMAIN                              N       ns2.example.com
DOMAIN                              M       mail.DOMAIN

(I have left out distance and ttl)
This works pretty much with vegadns as is.
this gives me a tinydns record like this:

#mysite.com
+mysite.com:1.2.3.4:3600
+ftp.mysite.com:1.2.3.4:3600
+mail.mysite.com:1.2.3.4:3600
+webmail.mysite.com:1.2.3.4:3600
+www.mysite.com:1.2.3.4:3600
@mysite.com::mail.mysite.com:10:3600
&mysite.com::ns1.example.com:3600
&mysite.com::ns2.example.com:3600
Zmysite.com:ns1.example.com:hostmaster.mysite.com:2006043000:16384:2048:1048576:2560:86400

(the last line might be wrapped)


BTW regarding the md5 passwords thing, here is what grep found on a virgin 
copy of 0.9.9.1. I've removed the CHANGELOG, md5update and smarty lines

vegadns-0.9.9.1 # grep -rn md5 *

src/create_tables.php:43:$q = "INSERT INTO accounts VALUES 
(0,0,'test@test.com','".md5
(test)."','Test','User','','senior_admin','active')";

src/functions.php:38:        Password='".md5($password)."' and

src/help.php:56:            $newpass = substr(md5(rand(0,10000)."vegadns_".
$_REQUEST['username'].rand(0,10000)),0,rand(5,8));

src/help.php:57:            mysql_query("update accounts set Password='".md5
($newpass)."' where cid=".$fa[0]);

src/users.php:100:     $q .=  ", Password='".md5
(mysql_escape_string($_REQUEST['password']))."'";

src/users.php:179:                '".md5
(mysql_escape_string($_REQUEST['password']))."',";

HTH
>
> Hi,
>
> I'm in the process of migrating a whole load of domains from bind to
> tinydns and also tidying up and standardising the domain records.
>
> I've set up the default records as follows:
>
> DOMAIN        NS      ns2.example.com
> DOMAIN                NS      ns1.example.com
> ftp.DOMAIN    CNAME   DOMAIN
> www.DOMAIN    CNAME   DOMAIN
> webmail.DOMAIN        CNAME   webmail.example.com
> pop3.DOMAIN   CNAME   pop3.example.com
> smtp.DOMAIN   CNAME   smtp.example.com
> mail.DOMAIN   CNAME   mail.example.com
> DOMAIN                MX      smtp.example.com
> imap.DOMAIN   CNAME   imap.example.com
>
> (example.com is the domain of the ISP)
>
> The vast majority of the domains will have identical records except for
> the A record which points to the host on which the website is hosted,
> i.e. they will have the above records plus an A record, e.g.
>
> DOMAIN                A       1.2.3.4
>
> (1.2.3.4 is the IP address of the server hosting the main website for
> DOMAIN)
>
> I've successfully transferred all the domains from bind to vegadns using
> axfr.
>
> Now what I want to do is to tidy up the domain records without having to
> manually edit every one.
>
> So, I've written some code that does the following:
>
> 1. move the code that adds the default records into a function so it can
> be called when adding a domain and also independently.
> 2. Add a new action to the default_domains code:
> "apply_default_records_to_all". This shows up as a link at the bottom of
> the Default Records page. THERE IS NO CONFIRMATION OR WARNING OF WHAT
> THIS DOES - CLICK THE LINK AND IT HAPPENS.
> 3. When the new link is clicked, FOR ALL DOMAINS: all records are
> deleted except the main A record (the one with the host the same as the
> domain), and the default records are added.
>
> It works for me, but it's rough, ugly, etc. etc. but I thought I'd throw
> the idea out there before integrating this in a better way.
>
> R.

-- 
-----------------
Bob Hutchinson
Midwales dot com
-----------------

Reply via email to