J
joe shaboo
HI,
I'm new to Perl. I'm trying to write a simple script which will
comment out a domain in my named.conf file for Bind.
What I would like to do, is write a script which will comment out a
domain from my named.conf if I no longer want to host that domain.
So, what I'd like to do is create a means to search for a domain
(mydomain.com) and comment out that file and all lines associated with
the file, and put a date when it was commented out. I'd also like to
take the UID of who commented it out, so if needed, we can ask that
person why it was commented out. As a hint we use sudo, so this should
be plausible, but again, not sure of the system command. If I use id,
it says I'm root, but how can I get the name of the user before I
became root?
named.conf example
zone "mydomain.com" {
type master;
file "/path/to/zone/mydomain.com";
notify yes;
}
What I'd like to do
// Domain taken out of named.conf at request of Customer by UID, date
// zone "mydomain.com" {
// type master;
// file "/path/to/zone/mydomain.com
// notify yes;
// }
Sounds simple enough, but I am not sure how to do it.
many thanks,
joe ([email protected])
I'm new to Perl. I'm trying to write a simple script which will
comment out a domain in my named.conf file for Bind.
What I would like to do, is write a script which will comment out a
domain from my named.conf if I no longer want to host that domain.
So, what I'd like to do is create a means to search for a domain
(mydomain.com) and comment out that file and all lines associated with
the file, and put a date when it was commented out. I'd also like to
take the UID of who commented it out, so if needed, we can ask that
person why it was commented out. As a hint we use sudo, so this should
be plausible, but again, not sure of the system command. If I use id,
it says I'm root, but how can I get the name of the user before I
became root?
named.conf example
zone "mydomain.com" {
type master;
file "/path/to/zone/mydomain.com";
notify yes;
}
What I'd like to do
// Domain taken out of named.conf at request of Customer by UID, date
// zone "mydomain.com" {
// type master;
// file "/path/to/zone/mydomain.com
// notify yes;
// }
Sounds simple enough, but I am not sure how to do it.
many thanks,
joe ([email protected])