[lxc-users] authentication in containers jacked-up!

Christian Brauner christian.brauner at getenv.org
Mon Apr 9 11:29:40 UTC 2018


On Thu, Mar 29, 2018 at 09:22:07AM -0400, Ray Jender wrote:
> So in Ubuntu 16.04.4 I created  4 LXD containers using LXC. From the host I
> created the first container then did $ lxc copy containter1 container2 , 1
> to 3 and 1 to 4.
> 
> It was a challenge for me to make them accessible from the outside world but
> I conquered that.
> 
>  
> 
> Now however I cannot su or sudo inside the containers?  For instance:
> 
>  
> 
> sudo find / -name testfile -print
> 
> sudo: no tty present and no askpass program specified
> 
>  
> 
> also.
> 
>  
> 
> When I do   $  lxc exec container1  /bin/bash  from the host:
> 
>  
> 
> I am put in:  ray at container1:/root$  // The "/root"  does not seem correct?
> 
>  
> 
> Also.
> 
>  
> 
> ray at container2:/etc$  visudo
> 
> visudo: /etc/sudoers: Permission denied
> 
>  
> 
> ray@ container2:/etc$  su visudo
> 
> su: must be run from a terminal
> 
>  
> 
> ray@ container 2:/etc$  sudo visudo
> 
> sudo: no tty present and no askpass program specified
> 
>  
> 
> Also when I try to putty into the container, I get the "login as:"  prompt,
> but when I enter the user name, I get:
> 
>  
> 
> puTTY Fatal Error
> 
> Disconnected: No supported authentication methods available (server sent:
> publickey)
> 
> (same error from WinSCP)
> 
>  
> 
> Any idea what I am missing?
> 
>  
> 
> Thanks, appreciate your help on this.

What containers (distro) are you creating?
What LXD version and what LXC version?

Christian


More information about the lxc-users mailing list