Install Bind9 without chroot

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

Install Bind9 without chroot

Postby xlin » Feb 23rd, '16, 22:37

How? I need to run the Samba 4. From this does not find the configuration files from the samba
MRC: mageialinux.ru
Mageia Russia
xlin
 
Posts: 53
Joined: May 3rd, '14, 14:26

Re: Install Bind9 without chroot

Postby doktor5000 » Feb 23rd, '16, 23:16

Can you please be a little more verbose? Where's the relation between bind and samba? Is there any error message you get?
And if it's only about the samba configuration files, simply add a bind mount for /etc/samba in the chroot ...
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18058
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Install Bind9 without chroot

Postby xlin » Feb 23rd, '16, 23:36

doktor5000 wrote:Can you please be a little more verbose? Where's the relation between bind and samba? Is there any error message you get?
And if it's only about the samba configuration files, simply add a bind mount for /etc/samba in the chroot ...

When you install the samba, it requires file from /usr/local/samba/lib/bind9

To start up a bind, he needed files outside the chroot

vim /etc/named.conf
Code: Select all
include "/usr/local/samba/lib/bind9/blablabla.bla"
MRC: mageialinux.ru
Mageia Russia
xlin
 
Posts: 53
Joined: May 3rd, '14, 14:26

Re: Install Bind9 without chroot

Postby doktor5000 » Feb 23rd, '16, 23:54

xlin wrote:When you install the samba, it requires file from /usr/local/samba/lib/bind9

It only requires anything from /usr/local if you compile it yourself, distribution packages don't install anything there.

Did you compile either samba or bind9 yourself?
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18058
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Install Bind9 without chroot

Postby xlin » Feb 23rd, '16, 23:57

Compile Samba 4 for themselves because it is not in the repository
Last edited by doktor5000 on Feb 24th, '16, 00:01, edited 1 time in total.
Reason: removed fullquote
MRC: mageialinux.ru
Mageia Russia
xlin
 
Posts: 53
Joined: May 3rd, '14, 14:26

Re: Install Bind9 without chroot

Postby doktor5000 » Feb 24th, '16, 00:01

Please next time do not use fullquotes, but only use the Reply function. Greatly improves clarity and reading flow ;)
If you want to know where the chroot happens, take a look at /usr/lib/systemd/system/named.service and the script that enables the chroot /usr/sbin/setup-named-chroot.sh

I still don't understand your issue. You want to compile samba4 and say it needs /usr/local/samba/lib/bind9.
Then you say that you want to include that file in the bind config?

Do you get any actual error message when compiling samba?


And you could simply rebuild the samba4 packages from cauldron under Mageia 5 which is probably easier then building from scratch.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18058
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Install Bind9 without chroot

Postby xlin » Feb 24th, '16, 00:24

doktor5000 wrote:Do you get any actual error message when compiling samba?


vim /etc/named.conf
Code: Select all
options {
        listen-on port 53 { 127.0.0.1; };
        listen-on-v6 port 53 { ::1; };
        directory       "/var/named";
        dump-file       "/var/named/data/cache_dump.db";
        statistics-file "/var/named/data/named_stats.txt";
        memstatistics-file "/var/named/data/named_mem_stats.txt";
        allow-query     { localhost; };
        recursion yes;

        dnssec-enable no;
        dnssec-validation no;
        dnssec-lookaside auto;

        /* Path to ISC DLV key */
        bindkeys-file "/etc/named.iscdlv.key";

        managed-keys-directory "/var/named/dynamic";
};

logging {
        channel default_debug {
                file "data/named.run";
                severity dynamic;
        };
};

include "/etc/named.root.key";
include "/usr/local/samba/private/named.conf";


cat /usr/local/samba/private/named.conf
Code: Select all
dlz "AD DNS Zone" {
    # For BIND 9.8.x
    # database "dlopen /usr/local/samba/lib/bind9/dlz_bind9.so";

    # For BIND 9.9.x
    # database "dlopen /usr/local/samba/lib/bind9/dlz_bind9_9.so";

    # For BIND 9.10.x
     database "dlopen /usr/local/samba/lib/bind9/dlz_bind9_10.so";
};


Code: Select all
[root@ad1 private]# systemctl status named.service -l
● named.service - Berkeley Internet Name Domain (DNS)
   Loaded: loaded (/usr/lib/systemd/system/named.service; enabled)
   Active: failed (Result: exit-code) since Ср 2016-02-24 01:23:42 MSK; 8s ago
  Process: 1961 ExecStopPost=/usr/sbin/setup-named-chroot.sh /var/lib/named off (code=exited, status=0/SUCCESS)
  Process: 1956 ExecStop=/bin/sh -c /usr/sbin/rndc stop > /dev/null 2>&1 || /bin/kill -TERM $MAINPID (code=exited, status=0/SUCCESS)
  Process: 1196 ExecStart=/usr/sbin/named -u named -t /var/lib/named $OPTIONS (code=exited, status=0/SUCCESS)
  Process: 2092 ExecStartPre=/usr/sbin/named-checkconf -t /var/lib/named -z /etc/named.conf (code=exited, status=1/FAILURE)
  Process: 2070 ExecStartPre=/usr/sbin/setup-named-chroot.sh /var/lib/named on (code=exited, status=0/SUCCESS)
 Main PID: 1200 (code=exited, status=0/SUCCESS)

фев 24 01:23:42 ad1 named-checkconf[2092]: /etc/named.conf:38: open: /usr/local/samba/private/named.conf: file not found
фев 24 01:23:42 ad1 systemd[1]: named.service: control process exited, code=exited status=1
фев 24 01:23:42 ad1 systemd[1]: Failed to start Berkeley Internet Name Domain (DNS).
фев 24 01:23:42 ad1 systemd[1]: Unit named.service entered failed state.
фев 24 01:23:42 ad1 systemd[1]: named.service failed.
MRC: mageialinux.ru
Mageia Russia
xlin
 
Posts: 53
Joined: May 3rd, '14, 14:26

Re: Install Bind9 without chroot

Postby xlin » Feb 24th, '16, 00:27

doktor5000 wrote:And you could simply rebuild the samba4 packages from cauldron under Mageia 5 which is probably easier then building from scratch.

He's not there
MRC: mageialinux.ru
Mageia Russia
xlin
 
Posts: 53
Joined: May 3rd, '14, 14:26

Re: Install Bind9 without chroot

Postby doktor5000 » Feb 24th, '16, 00:31

Then what's this?
Code: Select all
[user@openqa_mga6]─[23:31:05]─[~] urpmq --sources samba
ftp://ftp.snt.utwente.nl/pub/os/linux/mageia/distrib/cauldron/x86_64/media/core/release/samba-4.3.4-4.mga6.x86_64.rpm
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18058
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Install Bind9 without chroot

Postby xlin » Feb 24th, '16, 00:46

doktor5000 wrote:Then what's this?
Code: Select all
[user@openqa_mga6]─[23:31:05]─[~] urpmq --sources samba
ftp://ftp.snt.utwente.nl/pub/os/linux/mageia/distrib/cauldron/x86_64/media/core/release/samba-4.3.4-4.mga6.x86_64.rpm

Like it. To rebuild mga 5 and test. Thank you.
MRC: mageialinux.ru
Mageia Russia
xlin
 
Posts: 53
Joined: May 3rd, '14, 14:26

Re: Install Bind9 without chroot

Postby doktor5000 » Feb 24th, '16, 03:02

Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18058
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany


Return to Basic support

Who is online

Users browsing this forum: No registered users and 1 guest