OMV5 DNS change

  • login as: root

    root@192.168.1.63's password:

    Linux abserver.local 5.9.0-0.bpo.5-amd64 #1 SMP Debian 5.9.15-1~bpo10+1 (2020-12-31) x86_64


    The programs included with the Debian GNU/Linux system are free software;

    the exact distribution terms for each program are described in the

    individual files in /usr/share/doc/*/copyright.


    Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent

    permitted by applicable law.

    You have new mail.

    Last login: Fri Mar 19 18:20:43 2021 from 192.168.1.180

    root@abserver:~# ping -c 4 8.8.8.8

    PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.

    64 bytes from 8.8.8.8: icmp_seq=1 ttl=116 time=4.74 ms

    64 bytes from 8.8.8.8: icmp_seq=2 ttl=116 time=4.62 ms

    64 bytes from 8.8.8.8: icmp_seq=3 ttl=116 time=4.65 ms

    64 bytes from 8.8.8.8: icmp_seq=4 ttl=116 time=4.32 ms


    --- 8.8.8.8 ping statistics ---

    4 packets transmitted, 4 received, 0% packet loss, time 6ms

    rtt min/avg/max/mdev = 4.319/4.581/4.737/0.177 ms

    root@abserver:~# ping -c 4 google.com

    ping: google.com: Nome o servizio sconosciuto

    root@abserver:~# cat /etc/resolv.conf

    cat: /etc/resolv.conf: File o directory non esistente

    root@abserver:~# ls -al /etc/resolv.conf

    ls: impossibile accedere a '/etc/resolv.conf': File o directory non esistente

    root@abserver:~# sytemctl status systemd-resolved.service

    -bash: sytemctl: comando non trovato

    root@abserver:~#

  • This is the error from the update management

    Error #0:
    OMV\ExecException: Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C.UTF-8; apt-get --yes --allow-downgrades --allow-change-held-packages --download-only --reinstall install 'base-files' 2>&1' with exit code '100': Reading package lists...
    Building dependency tree...
    Reading state information...
    The following packages will be upgraded: base-files
    1 upgraded, 0 newly installed, 0 to remove and 56 not upgraded.
    Need to get 69.9 kB of archives.
    After this operation, 0 B of additional disk space will be used.
    Err:1 http://deb.debian.org/debian buster/main amd64 base-files amd64 10.3+deb10u8 Could not resolve 'deb.debian.org'
    E: Failed to fetch http://deb.debian.org/debian/p…es_10.3+deb10u8_amd64.deb Could not resolve 'deb.debian.org'
    E: Some files failed to download in /usr/share/php/openmediavault/system/process.inc:182
    Stack trace:
    #0 /usr/share/openmediavault/engined/rpc/apt.inc(342): OMV\System\Process->execute()
    #1 /usr/share/php/openmediavault/rpc/serviceabstract.inc(588): Engined\Rpc\Apt->Engined\Rpc\{closure}('/tmp/bgstatusew...', '/tmp/bgoutputVl...')
    #2 /usr/share/openmediavault/engined/rpc/apt.inc(398): OMV\Rpc\ServiceAbstract->execBgProc(Object(Closure))
    #3 [internal function]: Engined\Rpc\Apt->getChangeLog(Array, Array)
    #4 /usr/share/php/openmediavault/rpc/serviceabstract.inc(123): call_user_func_array(Array, Array)
    #5 /usr/share/php/openmediavault/rpc/rpc.inc(86): OMV\Rpc\ServiceAbstract->callMethod('getChangeLog', Array, Array)
    #6 /usr/sbin/omv-engined(537): OMV\Rpc\Rpc::call('Apt', 'getChangeLog', Array, Array, 1)
    #7 {main}


    Any idea!! Thanks

    • Offizieller Beitrag

    root@abserver:~# ls -al /etc/resolv.conf

    ls: impossibile accedere a '/etc/resolv.conf': File o directory non esistente

    Try again

    ln -s /run/systemd/resolve/resolv.conf /etc/


    any output?


    then

    ls -al /etc/resolv.conf

  • Interesting. Just checked on my system. I had upgraded from OMV 4 to 5. /etc/resolv.conf was not symlinked. There is no resolve directory within /run/systemd. I ran the omv-salt command, but no change. /etc/resolv.conf just contains my (standard) nameserver entry directly.

    The systemd-resolvd service, which would create /run/systemd/..., is only enabled by default on Buster installations. Also this symlink does not exist on systems upgraded. Further enabling and starting the service does not create the link. And, as mentioned somewhere in this thread, with systemd one is expected to use 127.0.0.153 as DNS server. So there are various ways how to deal with it. To enable and start the service on an upgraded system one has to do:


    sudo systemctl enable systemd-resolved

    sudo systemctl start systemd-resolved


    Then one can either link resolv.conf


    sudo ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf


    OR put the systemd DNS server into it:


    echo "127.0.0.53" | sudo tee /etc/resolv.conf


    The relevant configuration file /etc/systemd/resolved.conf can also contain specific DNS settings.

  • sytemctl

    Just to tell you, this is a typo.


    You should write: systemctl ....

  • I tried you commands but it does not work

    It seems the file resolv.conf does not exist and it is not possibile to recreate it


    login as: root

    root@192.168.1.63's password:

    Linux abserver.local 5.9.0-0.bpo.5-amd64 #1 SMP Debian 5.9.15-1~bpo10+1 (2020-12 -31) x86_64


    The programs included with the Debian GNU/Linux system are free software;

    the exact distribution terms for each program are described in the

    individual files in /usr/share/doc/*/copyright.


    Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent

    permitted by applicable law.

    You have new mail.

    Last login: Fri Mar 19 19:03:27 2021 from 192.168.1.180

    root@abserver:~# ls -s /run/systemd/resolve/resolv.conf /etc/

    4 /run/systemd/resolve/resolv.conf


    /etc/:

    totale 896

    4 adduser.conf 4 idmapd.conf 4 profile.d

    4 adjtime 4 ifplugd 4 proftpd

    4 aliases 4 init 4 protocols

    12 aliases.db 4 init.d 4 python

    4 alternatives 4 initramfs-tools 4 python2.7

    4 anacrontab 4 inputrc 4 python3

    4 apache2 4 insserv.conf.d 4 python3.7

    4 apm 4 iproute2 4 quotagrpadmins

    4 apparmor.d 4 iptables 4 quotatab

    4 apt 4 issue 4 rc0.d

    4 autoshutdown.conf 4 issue.net 4 rc1.d

    4 autoshutdown.d 4 kernel 4 rc2.d

    12 autoshutdown.default 4 kernel-img.conf 4 rc3.d

    4 avahi 4 ldap 4 rc4.d

    4 bash.bashrc 36 ld.so.cache 4 rc5.d

    4 bash_completion 4 ld.so.conf 4 rc6.d

    4 bash_completion.d 4 ld.so.conf.d 4 rcS.d

    4 bindresvport.blacklist 4 libaudit.conf 4 request-key.conf

    4 binfmt.d 4 libnl-3 4 request-key.d

    4 ca-certificates 4 locale.alias 4 resolvconf

    8 ca-certificates.conf 12 locale.gen 0 rmt

    8 ca-certificates.conf.dpkg-old 0 localtime 4 rpc

    4 calendar 4 logcheck 4 rsyslog.conf

    4 chrony 12 login.defs 4 rsyslog.d

    4 collectd 4 logrotate.conf 4 salt

    4 console-setup 4 logrotate.d 4 samba

    4 containerd 4 lsb-base-logging.sh 8 securetty

    4 cron-apt 4 lvm 4 security

    4 cron.d 4 machine-id 4 selinux

    4 cron.daily 4 magic 12 sensors3.conf

    4 cron.hourly 4 magic.mime 4 sensors.d

    4 cron.monthly 4 mailcap 20 services

    4 crontab 4 mailcap.order 4 shadow

    4 cron.weekly 4 mailname 4 shadow-

    4 davfs2 4 mail.rc 4 shells

    4 dbus-1 4 mdadm 4 skel

    4 debconf.conf 24 mime.types 4 smartd.conf

    4 debian_version 4 mke2fs.conf 4 smartmontools

    4 default 4 modprobe.d 4 ssh

    4 deluser.conf 4 modules 4 ssl

    4 dhcp 4 modules-load.d 4 subgid

    4 docker 4 monit 0 subgid-

    4 dpkg 4 motd 4 subuid

    4 e2scrub.conf 0 mtab 0 subuid-

    0 environment 12 nanorc 4 sudoers

    4 exports 4 netconfig 4 sudoers.d

    4 folder2ram 4 netplan 4 sysctl.conf

    4 fonts 4 network 4 sysctl.d

    4 fstab 4 NetworkManager 4 sysstat

    4 fstab.bak 4 networks 4 systemd

    4 ftpusers 4 nginx 4 teamviewer

    4 fuse.conf 4 nsswitch.conf 4 terminfo

    4 gai.conf 4 openmediavault 4 timezone

    4 glvnd 4 opt 4 tmpfiles.d

    4 group 0 os-release 4 ucf.conf

    4 group- 4 pam.conf 4 udev

    4 grub.d 4 pam.d 4 ufw

    4 gshadow 4 passwd 4 update-motd.d

    4 gshadow- 4 passwd- 4 vim

    4 gss 4 pcmcia 4 warnquota.conf

    4 hdparm.conf 4 perl 4 watchdog.conf

    4 host.conf 4 php 8 wgetrc

    4 hostname 4 pm 4 wpa_supplicant

    4 hosts 4 postfix 4 X11

    4 hosts.allow 4 ppp 4 xattr.conf

    4 hosts.deny 4 profile 4 xdg

    root@abserver:~# ls -al /etc/resolv.conf

    ls: impossibile accedere a '/etc/resolv.conf': File o directory non esistente

    root@abserver:~# sudo sytemctl enable systemd-resolved

    sudo: sytemctl: comando non trovato

    root@abserver:~# sudo systemctl enable systemd-resolved

    root@abserver:~# sudo systemctl start systemd-resolved

    root@abserver:~# sudo ln -sf /run/systemd/resolve/resolv.conf /etc/resolve.conf

    root@abserver:~# cat /etc/resolv.conf

    cat: /etc/resolv.conf: File o directory non esistente

    root@abserver:~# ls -al /etc/resolv.conf

    ls: impossibile accedere a '/etc/resolv.conf': File o directory non esistente

    root@abserver:~#


    No way to access or find that file '/etc/resolv.conf'

  • input the right command sorry


    this is the output


    root@abserver:~# ls -s /run/systemd/resolve/resolv.conf /etc/

    4 /run/systemd/resolve/resolv.conf


    /etc/:

    totale 896

    4 adduser.conf 4 ifplugd 4 protocols

    4 adjtime 4 init 4 python

    4 aliases 4 init.d 4 python2.7

    12 aliases.db 4 initramfs-tools 4 python3

    4 alternatives 4 inputrc 4 python3.7

    4 anacrontab 4 insserv.conf.d 4 quotagrpadmins

    4 apache2 4 iproute2 4 quotatab

    4 apm 4 iptables 4 rc0.d

    4 apparmor.d 4 issue 4 rc1.d

    4 apt 4 issue.net 4 rc2.d

    4 autoshutdown.conf 4 kernel 4 rc3.d

    4 autoshutdown.d 4 kernel-img.conf 4 rc4.d

    12 autoshutdown.default 4 ldap 4 rc5.d

    4 avahi 36 ld.so.cache 4 rc6.d

    4 bash.bashrc 4 ld.so.conf 4 rcS.d

    4 bash_completion 4 ld.so.conf.d 4 request-key.conf

    4 bash_completion.d 4 libaudit.conf 4 request-key.d

    4 bindresvport.blacklist 4 libnl-3 4 resolvconf

    4 binfmt.d 4 locale.alias 0 resolve.conf

    4 ca-certificates 12 locale.gen 0 rmt

    8 ca-certificates.conf 0 localtime 4 rpc

    8 ca-certificates.conf.dpkg-old 4 logcheck 4 rsyslog.conf

    4 calendar 12 login.defs 4 rsyslog.d

    4 chrony 4 logrotate.conf 4 salt

    4 collectd 4 logrotate.d 4 samba

    4 console-setup 4 lsb-base-logging.sh 8 securetty

    4 containerd 4 lvm 4 security

    4 cron-apt 4 machine-id 4 selinux

    4 cron.d 4 magic 12 sensors3.conf

    4 cron.daily 4 magic.mime 4 sensors.d

    4 cron.hourly 4 mailcap 20 services

    4 cron.monthly 4 mailcap.order 4 shadow

    4 crontab 4 mailname 4 shadow-

    4 cron.weekly 4 mail.rc 4 shells

    4 davfs2 4 mdadm 4 skel

    4 dbus-1 24 mime.types 4 smartd.conf

    4 debconf.conf 4 mke2fs.conf 4 smartmontools

    4 debian_version 4 modprobe.d 4 ssh

    4 default 4 modules 4 ssl

    4 deluser.conf 4 modules-load.d 4 subgid

    4 dhcp 4 monit 0 subgid-

    4 docker 4 motd 4 subuid

    4 dpkg 0 mtab 0 subuid-

    4 e2scrub.conf 12 nanorc 4 sudoers

    0 environment 4 netconfig 4 sudoers.d

    4 exports 4 netplan 4 sysctl.conf

    4 folder2ram 4 network 4 sysctl.d

    4 fonts 4 NetworkManager 4 sysstat

    4 fstab 4 networks 4 systemd

    4 fstab.bak 4 nginx 4 teamviewer

    4 ftpusers 4 nsswitch.conf 4 terminfo

    4 fuse.conf 4 openmediavault 4 timezone

    4 gai.conf 4 opt 4 tmpfiles.d

    4 glvnd 0 os-release 4 ucf.conf

    4 group 4 pam.conf 4 udev

    4 group- 4 pam.d 4 ufw

    4 grub.d 4 passwd 4 update-motd.d

    4 gshadow 4 passwd- 4 vim

    4 gshadow- 4 pcmcia 4 warnquota.conf

    4 gss 4 perl 4 watchdog.conf

    4 hdparm.conf 4 php 8 wgetrc

    4 host.conf 4 pm 4 wpa_supplicant

    4 hostname 4 postfix 4 X11

    4 hosts 4 ppp 4 xattr.conf

    4 hosts.allow 4 profile 4 xdg

    4 hosts.deny 4 profile.d

    4 idmapd.conf 4 proftpd

    root@abserver:~#

  • ok it seems the file already created


    root@abserver:~# ln -s /run/systemd/resolve/resolv.conf /etc/

    ln: creazione del collegamento simbolico '/etc/resolv.conf' non riuscita: File già esistente


    simlync creation not successfully file already exist

  • root@abserver:~# cat /etc/resolv.conf

    # This file is managed by man:systemd-resolved(8). Do not edit.

    #

    # This is a dynamic resolv.conf file for connecting local clients directly to

    # all known uplink DNS servers. This file lists all configured search domains.

    #

    # Third party programs must not access this file directly, but only through the

    # symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a different way,

    # replace this symlink by a static file or a different symlink.

    #

    # See man:systemd-resolved.service(8) for details about the supported modes of

    # operation for /etc/resolv.conf.


    nameserver 192.168.1.254

    root@abserver:~#

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!