Re: [lxc-users] Autostart Unpriviledged Containers

2015-10-10 Thread Fajar A. Nugraha
On Sat, Oct 10, 2015 at 11:48 PM, Paul Jones wrote: > The error i see in auth.log is that i'm already in a session and it cannot > start a session for user paul. That should not be the case IF you're on "/" cgroup. To make sure, can you try: - login as root, run sudo,

Re: [lxc-users] Autostart Unpriviledged Containers

2015-10-10 Thread Fajar A. Nugraha
On Sat, Oct 10, 2015 at 9:52 PM, Paul Jones wrote: > Thanks for you answers Fajar. The technology is still in it's infancy, so > I'm not surprised with the need to abuse sudo in this manner, and am willing > to work around it. If everything you tested fail, the sure-fire

Re: [lxc-users] Autostart Unpriviledged Containers

2015-10-10 Thread Paul Jones
Thanks for you answers Fajar. The technology is still in it's infancy, so I'm not surprised with the need to abuse sudo in this manner, and am willing to work around it. But i'm not sure I completely follow what you are saying. I get the error that you are mentioning from systemd, where it is

Re: [lxc-users] Autostart Unpriviledged Containers

2015-10-10 Thread Paul Jones
The error i see in auth.log is that i'm already in a session and it cannot start a session for user paul. I do believe i setup /etc/pam.d/sudo properly. paul ~ 12:40:07 $ cat /proc/self/cgroup 9:perf_event:/ 8:memory:/ 7:cpuset:/ 6:devices:/user.slice 5:blkio:/ 4:cpu,cpuacct:/ 3:freezer:/

Re: [lxc-users] Autostart Unpriviledged Containers

2015-10-10 Thread Fajar A. Nugraha
This one was a pain in the a$$ Apparently newer systemd is picky, saying "Cannot create session: Already running in a session" if it already runs in a session (e.g. root's session). Latest systemd have "machinectl shell" (https://github.com/systemd/systemd/pull/1022) which should eliminate the

Re: [lxc-users] Autostart Unpriviledged Containers

2015-10-09 Thread Fajar A. Nugraha
On Fri, Oct 9, 2015 at 7:19 AM, Paul Jones wrote: > I have tried this but for some reason I am having trouble. > > I have pastebins for my systemd unit file and the bash script it calls. > http://pastebin.com/FLtLWaih > http://pastebin.com/b9qM2a9J > > It appears as though

Re: [lxc-users] Autostart Unpriviledged Containers

2015-10-09 Thread Paul Jones
I would also like to note that when I run the script I created through the bash interpreter from tty it works just fine. Exactly as intended. I can then switch back to my user and move the tty to my new cgroup. The only time it doesn't work is when I attempt to call it from the systemd unit. It

Re: [lxc-users] Autostart Unpriviledged Containers

2015-10-08 Thread Paul Jones
I have tried this but for some reason I am having trouble. I have pastebins for my systemd unit file and the bash script it calls. http://pastebin.com/FLtLWaih http://pastebin.com/b9qM2a9J It appears as though it succesfully creates the cgroup "me", i see it, and i own it and have seemingly

Re: [lxc-users] Autostart Unpriviledged Containers

2015-10-05 Thread Xavier Gendre
Le 06/10/2015 06:03, Paul Jones a écrit : Hi. I'm using Debian Stretch. And I would like to use unpriviledged containers. It seems by default, there is one cgroup owned by root. In order to start an unpriviledged container I need to create a new cgroup, chown it to the unpriviledged user and

[lxc-users] Autostart Unpriviledged Containers

2015-10-05 Thread Paul Jones
Hi. I'm using Debian Stretch. And I would like to use unpriviledged containers. It seems by default, there is one cgroup owned by root. In order to start an unpriviledged container I need to create a new cgroup, chown it to the unpriviledged user and then move the current tty process into that