
6th February 2007, 07:38
|
|
Junior Member
|
|
Join Date: Feb 2007
Posts: 7
Thanks: 0
Thanked 1 Time in 1 Post
|
|
permission error with mydnsimport
When I import a zone using the following command
mydnsimport --axfr=1.2.3.4 -r domaname.net
I get the following when trying to view the record.
Error:
You don't have the permission to view this record or this record does not exist!
I have dropped the database and reinstalled everything with the same result. Any ideas?
|

7th February 2007, 04:38
|
|
Junior Member
|
|
Join Date: Feb 2007
Posts: 7
Thanks: 0
Thanked 1 Time in 1 Post
|
|
ok.. I have figured out that I need to manually edit the tables to get the zones viewable. My next question is.
1. How can I automate this while importing 10,000 domains?
2. How can I set permissions when the zone is added by a regular user?
example.. bob is a reseller and has his own login to add domains. I only want bob and the admin user to view his zones.
|

7th February 2007, 19:17
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,843
Thanks: 781
Thanked 1,557 Times in 1,476 Posts
|
|
Quote:
|
Originally Posted by thewebbie
1. How can I automate this while importing 10,000 domains?
|
You could write a script (e.g. in PHP) for it.
|

8th February 2007, 06:04
|
|
Junior Member
|
|
Join Date: Feb 2007
Posts: 7
Thanks: 0
Thanked 1 Time in 1 Post
|
|
Quote:
|
Originally Posted by falko
You could write a script (e.g. in PHP) for it.
|
If anyone interested. (note.. I am not a programmer nor do I play one on TV) It pulls all the zones and adjusts the data so the zones work after import.
Code:
<?php
$dbhost = 'localhost';
$dbuser = '*******';
$dbpass = '*******';
$conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql');
$dbname = 'mydns';
mysql_select_db($dbname);
$query = "SELECT origin FROM soa";
$result = mysql_query($query) or die('Error, query failed');
while($row = mysql_fetch_array($result, MYSQL_NUM))
{
$soa = $row[0];
print "Done with $soa \n";
mysql_query("UPDATE soa SET sys_perm_user='riud',sys_perm_group='riud',sys_userid='1',sys_groupid='1' WHERE origin='$soa'") or die(mysql_error());
}
mysql_close($conn);
?>
This one fixes the rr records
Code:
<?php
$dbhost = 'localhost';
$dbuser = '*******';
$dbpass = '*******';
$conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql');
$dbname = 'mydns';
mysql_select_db($dbname);
$query = "SELECT id FROM rr";
$result = mysql_query($query) or die('Error, query failed');
while($row = mysql_fetch_array($result, MYSQL_NUM))
{
$rr = $row[0];
print "Record ID $rr \n";
mysql_query("UPDATE rr SET sys_perm_user='riud',sys_perm_group='riud',sys_userid='1',sys_groupid='1' WHERE id='$rr'") or die(mysql_error());
}
mysql_close($conn);
?>
|
|
The Following User Says Thank You to thewebbie For This Useful Post:
|
dahas (27th March 2007)
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT +2. The time now is 14:36.
|
Recent comments
6 hours 3 min ago
11 hours 19 min ago
11 hours 30 min ago
11 hours 38 min ago
12 hours 40 min ago
14 hours 48 min ago
17 hours 13 min ago
17 hours 31 min ago
17 hours 40 min ago
18 hours 55 min ago