<div dir="ltr"><div><div><div><div><div>Thank you for the responce.<br><br></div>I'm using ubuntu trusty both as host and guest.<br><br></div>If I try to use ubuntu precise guest instead, sudo fails again, but this time the message is:<br>
<br>sudo: must be setuid root<br><br></div>Which is definitely wrong:<br><br>ubuntu@up:~$ ls -l /usr/bin/sudo<br>-rwsr-xr-x 2 root root 71288 Mar 11 12:24 /usr/bin/sudo<br><br></div>(sorry, I'm limited in highlighting abilities).<br>
<br></div>What's interesting, today I tried to create dedicated user for the lxc, and (besides minor annoyance with login, already listed in comments to original blog post: <a href="https://www.stgraber.org/2014/01/17/lxc-1-0-unprivileged-containers/#comment-183540">https://www.stgraber.org/2014/01/17/lxc-1-0-unprivileged-containers/#comment-183540</a>), sudo works in guest, but this time lxc-attach fails. I conceive no differences between my regular host account and this new one, except for encrypted home, sudo ability (on host), etc.<br>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jun 16, 2014 at 5:51 PM, Serge Hallyn <span dir="ltr"><<a href="mailto:serge.hallyn@ubuntu.com" target="_blank">serge.hallyn@ubuntu.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">Quoting Vitaly Belostotsky (<a href="mailto:spam.for.byly@gmail.com">spam.for.byly@gmail.com</a>):<br>
> Hi, all!<br>
><br>
> I'm trying to reproduce steps in<br>
> <a href="https://www.stgraber.org/2014/01/17/lxc-1-0-unprivileged-containers/" target="_blank">https://www.stgraber.org/2014/01/17/lxc-1-0-unprivileged-containers/</a>.<br>
> Everything goes well except for sudo producing error:<br>
><br>
> sudo: effective uid is not 0, is /usr/bin/sudo on a file system with the<br>
> 'nosuid' option set or an NFS file system without root privileges?<br>
><br>
> I'm using updated ubuntu 14.04 distro.<br>
><br>
> OTOH, when I use lxc-attach, I get the root shell in container and I can<br>
> execute necessary commands (such as apt-get). But it's not as convenient,<br>
> I'd prefer to use sudo.<br>
><br>
> What is my mistake?<br>
> I failed to google relevant info, so I ask here. Thanks in advance.<br>
<br>
</div></div>Hi,<br>
<br>
I suspect you're seeing this bug:<br>
<br>
<a href="https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/1263738" target="_blank">https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/1263738</a><br>
<br>
I no longer see it in most cases with trusty and later guests at<br>
least - precise guests probably would still exhibit it. What host<br>
and guest OS+release are you using?<br>
_______________________________________________<br>
lxc-users mailing list<br>
<a href="mailto:lxc-users@lists.linuxcontainers.org">lxc-users@lists.linuxcontainers.org</a><br>
<a href="http://lists.linuxcontainers.org/listinfo/lxc-users" target="_blank">http://lists.linuxcontainers.org/listinfo/lxc-users</a></blockquote></div><br></div>