name resolves doesn't work in chroot for users, but does for root The 2019 Stack Overflow...

Delete all lines which don't have n characters before delimiter

Is "plugging out" electronic devices an American expression?

What is the motivation for a law requiring 2 parties to consent for recording a conversation

How to notate time signature switching consistently every measure

Is flight data recorder erased after every flight?

Why do we hear so much about the Trump administration deciding to impose and then remove tariffs?

Should I use my personal e-mail address, or my workplace one, when registering to external websites for work purposes?

How to support a colleague who finds meetings extremely tiring?

What did it mean to "align" a radio?

Why didn't the Event Horizon Telescope team mention Sagittarius A*?

FPGA - DIY Programming

Earliest use of the term "Galois extension"?

What is the most effective way of iterating a std::vector and why?

Is a "Democratic" Oligarchy-Style System Possible?

If a Druid sees an animal’s corpse, can they wild shape into that animal?

What does Linus Torvalds mean when he says that Git "never ever" tracks a file?

Lightning Grid - Columns and Rows?

How are circuits which use complex ICs normally simulated?

Does a dangling wire really electrocute me if I'm standing in water?

What do hard-Brexiteers want with respect to the Irish border?

Return to UK after being refused entry years previously

Why can Shazam fly?

Are there any other methods to apply to solving simultaneous equations?

Is there any way to tell whether the shot is going to hit you or not?



name resolves doesn't work in chroot for users, but does for root



The 2019 Stack Overflow Developer Survey Results Are InSudo does not work in chrootSet up chroot for LDAP users in RHEL6IP access okay but ping doesn't workchroot permission denied! But I'm root!startx doesn't work with usersTrying to transplant bash to /mnt for chroot, what does bash want in order to work?Why does connecting using an ssh key fail with one host name but work with others?How to sandbox code in chroot for multiple users?Traceroute works (very slowly) but internet doesn't workSetting up logging for chroot users





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







2















I've booted a live-cd in order to download, compile and install a few packages on a otherwise working system without actually booting said system.



I've created a build user on the system by issuing useradd -m -G wheel -s /bin/bash builder



I then proceed to mounting my partition and a chroot environment:



# mount /dev/mapper/luksdev on /mnt
# cd /mnt
# cp /etc/resolv.conf etc
# mount -t proc /proc proc
# mount --make-rslave --rbind /sys sys
# mount --make-rslave --rbind /dev dev
# mount --make-rslave --rbind /run run
# chroot /mnt /bin/bash


After this, I clone, chown and move into the project to build.



(chroot)# git clone https://aur.archlinux.org/lighttpd2-git.git /home/builder/lighttpd2
(chroot)# chown -R builder.builder /home/builder/lighttpd2
(chroot)# sudo -u builder -s
(chroot|builder ~)$ cd /home/builder/lighttpd2/
(chroot|builder lighttpd2)$ /usr/bin/makepkg -s --noconfirm


As root, I have no issues performing name lookups, so the git clone will work as inteded. But switching to any other user during the build process of this package (or if I run the git clone as non-root), I will get:



fatal: unable to access 'https://git.lighttpd.net/lighttpd/lighttpd2.git/': Could not resolve host: git.lighttpd.net


So I thought of doing simple ping check to isolate the issue. Doing ping www.google.com works as root, but not as builder.
However, doing ping 8.8.8.8 works for both root & builder.



(chroot)# ping -c 1 www.google.com
PING www.google.com (172.217.22.164) 56(84) bytes of data.
64 bytes from arn09s11-in-f164.1e100.net (172.217.22.164): icmp_seq=1 ttl=55 time=2.03 ms

(chroot|builder)$ ping -c 1 www.google.com
ping: www.google.com: Name or service not known

(chroot)# ping -c 1 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=121 time=1.97 ms

(chroot|builder)$ ping -c 1 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=121 time=1.98 ms


logically, I thought it has to do with the name resolutions for the specific user.. But doing:



(chroot)# nslookup www.google.com
Server: 8.8.8.8
Name: www.google.com
Address: 216.58.207.196

(chroot|builder)$ nslookup www.google.com
Server: 8.8.8.8
Name: www.google.com
Address: 216.58.207.196


Both users can do nslookup and shows that /etc/resolv.conf is present and works. But pinging a hostname or using any type of name-resolve tasks outside of nslookup/dig won't work:



(chroot|builder)$ python
>>> from socket import *
>>> s = socket()
>>> s.connect(('www.google.com', 80))
socket.gaierror: [Errno -2] Name or service not known


I tried sticking solely to ping to keep things simple.

I've also tried making sure nothing's blocking my ping usage:



(chroot)# chown root:root /bin/ping; chmod u+srwx,go=rx /bin/ping
(chroot)# getcap /usr/bin/ping
/usr/bin/ping = cap_net_raw+ep


But even then, I'm not allowed to ping using hostnames, but IP's still work.



(chroot|builder)$ strace ping www.google.com
socket(AF_INET, SOCK_DGRAM, IPPROTO_ICMP) = -1 EACCESS (Permission denied)
socket(AF_INET, SOCK_RAW, IPPROTO_ICMP) = -1 EPERM (Operation not permitted)
write(2, "ping: socket: Operation not perm"..., 38ping: socket: Operation not permitted)= 38


/home and /root are not mounted with nosuid either. Sadly, this is a VM so I can only supply a screenshot of it.



Since I'm trying ping from /home, I don't see a reason why this would cause the issue either. If I boot into the system, and do the exact same thing with the user I created during the live-cd boot.. I can ping hostnames.



At this point I mainly want to understand why some users can perform ping, lookups etc. And some don't during a chroot environment. I'm not sure where to debug/continue from here on in order to try and fix or understand the underlying problem. A couple of helpful souls over at IRC also tried to give a helping hand but we're all baffled.



Edit:



I've narrowed it down to the mount --make-rslave --rbind /run run being the issue. It's the cause for whatever reason. If I try to ping www.google.com after each mount command (at the start of the question), it stops right after /run is mounted.



enter image description here










share|improve this question

























  • Which live-cd distribution are you using? Does it possibly have an Linux Security Module in place? Like SELinux or apparmor for instance

    – LL3
    yesterday






  • 1





    Instead of a chroot, what happens if you use systemd-nspawn to start a container in it?

    – muru
    20 hours ago






  • 1





    @muru That works. I used systemd-nspawn -D /mnt --machine test, seeing as I've never used systemd-nspawn I'd greatly appreciate it if I got any pointers if that's the wrong way of doing it. /run is empty when doing this with the exception of systemd being in there. But it sure works.

    – Torxed
    19 hours ago






  • 1





    @Torxed that's pretty much how I use it too (except I may add -b if I want some service within the chroot to start as well, but you probably don't need it). I gave up on messing around with mounts and networking with chroot and switched to systemd-nspawn because of problems like this.

    – muru
    19 hours ago








  • 1





    @muru I'm starting to feel the pain and understand why you did. I suggest you do a write-up on the solution. I'll mark it as a appropriate answer in a day or two if no one else has an answer to the original problem of why this happens.

    – Torxed
    19 hours ago


















2















I've booted a live-cd in order to download, compile and install a few packages on a otherwise working system without actually booting said system.



I've created a build user on the system by issuing useradd -m -G wheel -s /bin/bash builder



I then proceed to mounting my partition and a chroot environment:



# mount /dev/mapper/luksdev on /mnt
# cd /mnt
# cp /etc/resolv.conf etc
# mount -t proc /proc proc
# mount --make-rslave --rbind /sys sys
# mount --make-rslave --rbind /dev dev
# mount --make-rslave --rbind /run run
# chroot /mnt /bin/bash


After this, I clone, chown and move into the project to build.



(chroot)# git clone https://aur.archlinux.org/lighttpd2-git.git /home/builder/lighttpd2
(chroot)# chown -R builder.builder /home/builder/lighttpd2
(chroot)# sudo -u builder -s
(chroot|builder ~)$ cd /home/builder/lighttpd2/
(chroot|builder lighttpd2)$ /usr/bin/makepkg -s --noconfirm


As root, I have no issues performing name lookups, so the git clone will work as inteded. But switching to any other user during the build process of this package (or if I run the git clone as non-root), I will get:



fatal: unable to access 'https://git.lighttpd.net/lighttpd/lighttpd2.git/': Could not resolve host: git.lighttpd.net


So I thought of doing simple ping check to isolate the issue. Doing ping www.google.com works as root, but not as builder.
However, doing ping 8.8.8.8 works for both root & builder.



(chroot)# ping -c 1 www.google.com
PING www.google.com (172.217.22.164) 56(84) bytes of data.
64 bytes from arn09s11-in-f164.1e100.net (172.217.22.164): icmp_seq=1 ttl=55 time=2.03 ms

(chroot|builder)$ ping -c 1 www.google.com
ping: www.google.com: Name or service not known

(chroot)# ping -c 1 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=121 time=1.97 ms

(chroot|builder)$ ping -c 1 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=121 time=1.98 ms


logically, I thought it has to do with the name resolutions for the specific user.. But doing:



(chroot)# nslookup www.google.com
Server: 8.8.8.8
Name: www.google.com
Address: 216.58.207.196

(chroot|builder)$ nslookup www.google.com
Server: 8.8.8.8
Name: www.google.com
Address: 216.58.207.196


Both users can do nslookup and shows that /etc/resolv.conf is present and works. But pinging a hostname or using any type of name-resolve tasks outside of nslookup/dig won't work:



(chroot|builder)$ python
>>> from socket import *
>>> s = socket()
>>> s.connect(('www.google.com', 80))
socket.gaierror: [Errno -2] Name or service not known


I tried sticking solely to ping to keep things simple.

I've also tried making sure nothing's blocking my ping usage:



(chroot)# chown root:root /bin/ping; chmod u+srwx,go=rx /bin/ping
(chroot)# getcap /usr/bin/ping
/usr/bin/ping = cap_net_raw+ep


But even then, I'm not allowed to ping using hostnames, but IP's still work.



(chroot|builder)$ strace ping www.google.com
socket(AF_INET, SOCK_DGRAM, IPPROTO_ICMP) = -1 EACCESS (Permission denied)
socket(AF_INET, SOCK_RAW, IPPROTO_ICMP) = -1 EPERM (Operation not permitted)
write(2, "ping: socket: Operation not perm"..., 38ping: socket: Operation not permitted)= 38


/home and /root are not mounted with nosuid either. Sadly, this is a VM so I can only supply a screenshot of it.



Since I'm trying ping from /home, I don't see a reason why this would cause the issue either. If I boot into the system, and do the exact same thing with the user I created during the live-cd boot.. I can ping hostnames.



At this point I mainly want to understand why some users can perform ping, lookups etc. And some don't during a chroot environment. I'm not sure where to debug/continue from here on in order to try and fix or understand the underlying problem. A couple of helpful souls over at IRC also tried to give a helping hand but we're all baffled.



Edit:



I've narrowed it down to the mount --make-rslave --rbind /run run being the issue. It's the cause for whatever reason. If I try to ping www.google.com after each mount command (at the start of the question), it stops right after /run is mounted.



enter image description here










share|improve this question

























  • Which live-cd distribution are you using? Does it possibly have an Linux Security Module in place? Like SELinux or apparmor for instance

    – LL3
    yesterday






  • 1





    Instead of a chroot, what happens if you use systemd-nspawn to start a container in it?

    – muru
    20 hours ago






  • 1





    @muru That works. I used systemd-nspawn -D /mnt --machine test, seeing as I've never used systemd-nspawn I'd greatly appreciate it if I got any pointers if that's the wrong way of doing it. /run is empty when doing this with the exception of systemd being in there. But it sure works.

    – Torxed
    19 hours ago






  • 1





    @Torxed that's pretty much how I use it too (except I may add -b if I want some service within the chroot to start as well, but you probably don't need it). I gave up on messing around with mounts and networking with chroot and switched to systemd-nspawn because of problems like this.

    – muru
    19 hours ago








  • 1





    @muru I'm starting to feel the pain and understand why you did. I suggest you do a write-up on the solution. I'll mark it as a appropriate answer in a day or two if no one else has an answer to the original problem of why this happens.

    – Torxed
    19 hours ago














2












2








2


1






I've booted a live-cd in order to download, compile and install a few packages on a otherwise working system without actually booting said system.



I've created a build user on the system by issuing useradd -m -G wheel -s /bin/bash builder



I then proceed to mounting my partition and a chroot environment:



# mount /dev/mapper/luksdev on /mnt
# cd /mnt
# cp /etc/resolv.conf etc
# mount -t proc /proc proc
# mount --make-rslave --rbind /sys sys
# mount --make-rslave --rbind /dev dev
# mount --make-rslave --rbind /run run
# chroot /mnt /bin/bash


After this, I clone, chown and move into the project to build.



(chroot)# git clone https://aur.archlinux.org/lighttpd2-git.git /home/builder/lighttpd2
(chroot)# chown -R builder.builder /home/builder/lighttpd2
(chroot)# sudo -u builder -s
(chroot|builder ~)$ cd /home/builder/lighttpd2/
(chroot|builder lighttpd2)$ /usr/bin/makepkg -s --noconfirm


As root, I have no issues performing name lookups, so the git clone will work as inteded. But switching to any other user during the build process of this package (or if I run the git clone as non-root), I will get:



fatal: unable to access 'https://git.lighttpd.net/lighttpd/lighttpd2.git/': Could not resolve host: git.lighttpd.net


So I thought of doing simple ping check to isolate the issue. Doing ping www.google.com works as root, but not as builder.
However, doing ping 8.8.8.8 works for both root & builder.



(chroot)# ping -c 1 www.google.com
PING www.google.com (172.217.22.164) 56(84) bytes of data.
64 bytes from arn09s11-in-f164.1e100.net (172.217.22.164): icmp_seq=1 ttl=55 time=2.03 ms

(chroot|builder)$ ping -c 1 www.google.com
ping: www.google.com: Name or service not known

(chroot)# ping -c 1 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=121 time=1.97 ms

(chroot|builder)$ ping -c 1 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=121 time=1.98 ms


logically, I thought it has to do with the name resolutions for the specific user.. But doing:



(chroot)# nslookup www.google.com
Server: 8.8.8.8
Name: www.google.com
Address: 216.58.207.196

(chroot|builder)$ nslookup www.google.com
Server: 8.8.8.8
Name: www.google.com
Address: 216.58.207.196


Both users can do nslookup and shows that /etc/resolv.conf is present and works. But pinging a hostname or using any type of name-resolve tasks outside of nslookup/dig won't work:



(chroot|builder)$ python
>>> from socket import *
>>> s = socket()
>>> s.connect(('www.google.com', 80))
socket.gaierror: [Errno -2] Name or service not known


I tried sticking solely to ping to keep things simple.

I've also tried making sure nothing's blocking my ping usage:



(chroot)# chown root:root /bin/ping; chmod u+srwx,go=rx /bin/ping
(chroot)# getcap /usr/bin/ping
/usr/bin/ping = cap_net_raw+ep


But even then, I'm not allowed to ping using hostnames, but IP's still work.



(chroot|builder)$ strace ping www.google.com
socket(AF_INET, SOCK_DGRAM, IPPROTO_ICMP) = -1 EACCESS (Permission denied)
socket(AF_INET, SOCK_RAW, IPPROTO_ICMP) = -1 EPERM (Operation not permitted)
write(2, "ping: socket: Operation not perm"..., 38ping: socket: Operation not permitted)= 38


/home and /root are not mounted with nosuid either. Sadly, this is a VM so I can only supply a screenshot of it.



Since I'm trying ping from /home, I don't see a reason why this would cause the issue either. If I boot into the system, and do the exact same thing with the user I created during the live-cd boot.. I can ping hostnames.



At this point I mainly want to understand why some users can perform ping, lookups etc. And some don't during a chroot environment. I'm not sure where to debug/continue from here on in order to try and fix or understand the underlying problem. A couple of helpful souls over at IRC also tried to give a helping hand but we're all baffled.



Edit:



I've narrowed it down to the mount --make-rslave --rbind /run run being the issue. It's the cause for whatever reason. If I try to ping www.google.com after each mount command (at the start of the question), it stops right after /run is mounted.



enter image description here










share|improve this question
















I've booted a live-cd in order to download, compile and install a few packages on a otherwise working system without actually booting said system.



I've created a build user on the system by issuing useradd -m -G wheel -s /bin/bash builder



I then proceed to mounting my partition and a chroot environment:



# mount /dev/mapper/luksdev on /mnt
# cd /mnt
# cp /etc/resolv.conf etc
# mount -t proc /proc proc
# mount --make-rslave --rbind /sys sys
# mount --make-rslave --rbind /dev dev
# mount --make-rslave --rbind /run run
# chroot /mnt /bin/bash


After this, I clone, chown and move into the project to build.



(chroot)# git clone https://aur.archlinux.org/lighttpd2-git.git /home/builder/lighttpd2
(chroot)# chown -R builder.builder /home/builder/lighttpd2
(chroot)# sudo -u builder -s
(chroot|builder ~)$ cd /home/builder/lighttpd2/
(chroot|builder lighttpd2)$ /usr/bin/makepkg -s --noconfirm


As root, I have no issues performing name lookups, so the git clone will work as inteded. But switching to any other user during the build process of this package (or if I run the git clone as non-root), I will get:



fatal: unable to access 'https://git.lighttpd.net/lighttpd/lighttpd2.git/': Could not resolve host: git.lighttpd.net


So I thought of doing simple ping check to isolate the issue. Doing ping www.google.com works as root, but not as builder.
However, doing ping 8.8.8.8 works for both root & builder.



(chroot)# ping -c 1 www.google.com
PING www.google.com (172.217.22.164) 56(84) bytes of data.
64 bytes from arn09s11-in-f164.1e100.net (172.217.22.164): icmp_seq=1 ttl=55 time=2.03 ms

(chroot|builder)$ ping -c 1 www.google.com
ping: www.google.com: Name or service not known

(chroot)# ping -c 1 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=121 time=1.97 ms

(chroot|builder)$ ping -c 1 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=121 time=1.98 ms


logically, I thought it has to do with the name resolutions for the specific user.. But doing:



(chroot)# nslookup www.google.com
Server: 8.8.8.8
Name: www.google.com
Address: 216.58.207.196

(chroot|builder)$ nslookup www.google.com
Server: 8.8.8.8
Name: www.google.com
Address: 216.58.207.196


Both users can do nslookup and shows that /etc/resolv.conf is present and works. But pinging a hostname or using any type of name-resolve tasks outside of nslookup/dig won't work:



(chroot|builder)$ python
>>> from socket import *
>>> s = socket()
>>> s.connect(('www.google.com', 80))
socket.gaierror: [Errno -2] Name or service not known


I tried sticking solely to ping to keep things simple.

I've also tried making sure nothing's blocking my ping usage:



(chroot)# chown root:root /bin/ping; chmod u+srwx,go=rx /bin/ping
(chroot)# getcap /usr/bin/ping
/usr/bin/ping = cap_net_raw+ep


But even then, I'm not allowed to ping using hostnames, but IP's still work.



(chroot|builder)$ strace ping www.google.com
socket(AF_INET, SOCK_DGRAM, IPPROTO_ICMP) = -1 EACCESS (Permission denied)
socket(AF_INET, SOCK_RAW, IPPROTO_ICMP) = -1 EPERM (Operation not permitted)
write(2, "ping: socket: Operation not perm"..., 38ping: socket: Operation not permitted)= 38


/home and /root are not mounted with nosuid either. Sadly, this is a VM so I can only supply a screenshot of it.



Since I'm trying ping from /home, I don't see a reason why this would cause the issue either. If I boot into the system, and do the exact same thing with the user I created during the live-cd boot.. I can ping hostnames.



At this point I mainly want to understand why some users can perform ping, lookups etc. And some don't during a chroot environment. I'm not sure where to debug/continue from here on in order to try and fix or understand the underlying problem. A couple of helpful souls over at IRC also tried to give a helping hand but we're all baffled.



Edit:



I've narrowed it down to the mount --make-rslave --rbind /run run being the issue. It's the cause for whatever reason. If I try to ping www.google.com after each mount command (at the start of the question), it stops right after /run is mounted.



enter image description here







linux arch-linux chroot ping hostname






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 20 hours ago







Torxed

















asked yesterday









TorxedTorxed

1,26641736




1,26641736













  • Which live-cd distribution are you using? Does it possibly have an Linux Security Module in place? Like SELinux or apparmor for instance

    – LL3
    yesterday






  • 1





    Instead of a chroot, what happens if you use systemd-nspawn to start a container in it?

    – muru
    20 hours ago






  • 1





    @muru That works. I used systemd-nspawn -D /mnt --machine test, seeing as I've never used systemd-nspawn I'd greatly appreciate it if I got any pointers if that's the wrong way of doing it. /run is empty when doing this with the exception of systemd being in there. But it sure works.

    – Torxed
    19 hours ago






  • 1





    @Torxed that's pretty much how I use it too (except I may add -b if I want some service within the chroot to start as well, but you probably don't need it). I gave up on messing around with mounts and networking with chroot and switched to systemd-nspawn because of problems like this.

    – muru
    19 hours ago








  • 1





    @muru I'm starting to feel the pain and understand why you did. I suggest you do a write-up on the solution. I'll mark it as a appropriate answer in a day or two if no one else has an answer to the original problem of why this happens.

    – Torxed
    19 hours ago



















  • Which live-cd distribution are you using? Does it possibly have an Linux Security Module in place? Like SELinux or apparmor for instance

    – LL3
    yesterday






  • 1





    Instead of a chroot, what happens if you use systemd-nspawn to start a container in it?

    – muru
    20 hours ago






  • 1





    @muru That works. I used systemd-nspawn -D /mnt --machine test, seeing as I've never used systemd-nspawn I'd greatly appreciate it if I got any pointers if that's the wrong way of doing it. /run is empty when doing this with the exception of systemd being in there. But it sure works.

    – Torxed
    19 hours ago






  • 1





    @Torxed that's pretty much how I use it too (except I may add -b if I want some service within the chroot to start as well, but you probably don't need it). I gave up on messing around with mounts and networking with chroot and switched to systemd-nspawn because of problems like this.

    – muru
    19 hours ago








  • 1





    @muru I'm starting to feel the pain and understand why you did. I suggest you do a write-up on the solution. I'll mark it as a appropriate answer in a day or two if no one else has an answer to the original problem of why this happens.

    – Torxed
    19 hours ago

















Which live-cd distribution are you using? Does it possibly have an Linux Security Module in place? Like SELinux or apparmor for instance

– LL3
yesterday





Which live-cd distribution are you using? Does it possibly have an Linux Security Module in place? Like SELinux or apparmor for instance

– LL3
yesterday




1




1





Instead of a chroot, what happens if you use systemd-nspawn to start a container in it?

– muru
20 hours ago





Instead of a chroot, what happens if you use systemd-nspawn to start a container in it?

– muru
20 hours ago




1




1





@muru That works. I used systemd-nspawn -D /mnt --machine test, seeing as I've never used systemd-nspawn I'd greatly appreciate it if I got any pointers if that's the wrong way of doing it. /run is empty when doing this with the exception of systemd being in there. But it sure works.

– Torxed
19 hours ago





@muru That works. I used systemd-nspawn -D /mnt --machine test, seeing as I've never used systemd-nspawn I'd greatly appreciate it if I got any pointers if that's the wrong way of doing it. /run is empty when doing this with the exception of systemd being in there. But it sure works.

– Torxed
19 hours ago




1




1





@Torxed that's pretty much how I use it too (except I may add -b if I want some service within the chroot to start as well, but you probably don't need it). I gave up on messing around with mounts and networking with chroot and switched to systemd-nspawn because of problems like this.

– muru
19 hours ago







@Torxed that's pretty much how I use it too (except I may add -b if I want some service within the chroot to start as well, but you probably don't need it). I gave up on messing around with mounts and networking with chroot and switched to systemd-nspawn because of problems like this.

– muru
19 hours ago






1




1





@muru I'm starting to feel the pain and understand why you did. I suggest you do a write-up on the solution. I'll mark it as a appropriate answer in a day or two if no one else has an answer to the original problem of why this happens.

– Torxed
19 hours ago





@muru I'm starting to feel the pain and understand why you did. I suggest you do a write-up on the solution. I'll mark it as a appropriate answer in a day or two if no one else has an answer to the original problem of why this happens.

– Torxed
19 hours ago










0






active

oldest

votes












Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f511551%2fname-resolves-doesnt-work-in-chroot-for-users-but-does-for-root%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Unix & Linux Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f511551%2fname-resolves-doesnt-work-in-chroot-for-users-but-does-for-root%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Taj Mahal Inhaltsverzeichnis Aufbau | Geschichte | 350-Jahr-Feier | Heutige Bedeutung | Siehe auch |...

Baia Sprie Cuprins Etimologie | Istorie | Demografie | Politică și administrație | Arii naturale...

Nicolae Petrescu-Găină Cuprins Biografie | Opera | In memoriam | Varia | Controverse, incertitudini...