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

Ray Jender rayjender at gmail.com
Thu Mar 29 13:22:07 UTC 2018


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.


Ray

 

 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20180329/01026684/attachment-0001.html>


More information about the lxc-users mailing list