[lxc-users] Inittab, consoles and unprivileged containers.

Ben Green ben at bristolwireless.net
Fri Mar 6 12:03:53 UTC 2020


Hi all,

I'm wondering if I could have my inittab set up better for my
environment. I'm running LXC conataners, full root file systems, Debian.
Running sysv and not systemd. I've found this the only way to properly
get root on these machines:


 lxcadmin at darkwing:~$ lxc-attach -n karoo
 root at karoo:/# su -
 mesg: ttyname failed: No such device
 root at karoo:~#

The initial login lacks the full environment without the 'su -'m that is
bash is running, but the standard login scripts have not been run and
ENV is not fully populated.

The warning 'mesg: ttyname failed: No such device' show that the shell
I'm in has no access to a tty, it's a 'mesg n' command being run from
'/root/.profile'. I guess that's fine.


I'm interested in:

* Is there a way I can create an accessible console for these machines?
* Is there a better way of using lxc-attach to get a full normal enviroment?
* What should inittab read and would it facilitate this? (It's currently
the Debian default).

As well as direct answers I'd love some resources to read around this if
people have any recommendations.

-- 
Cheers,
Ben Green


More information about the lxc-users mailing list