Show banner on lxc-attach

Hi!
I would like to show a banner whenever one attaches to one particular privileged container’s console using lxc-attach. Is this possible to implement somehow? It seems like none of /etc/profile or ~/.bashrc are actually used by lxc-attach.

You want:

lxc-attach -n NAME -- login -f root
1 Like

Yes, but then all developers who have access to privileged containers will have to type that every time. I thought there was a way to do smth like that without starting the login shell explicitly. I guess, the only solution for me is to make a wrapper script for lxc-attach