Re: [systemd-devel] user startable services in systemd context
On Thu, 07.04.11 14:55, Marius Tolzmann (tolzm...@molgen.mpg.de) wrote: Heya, we have a setup where every user can start its own services (e.g. a webserver, database server, whatever). if the user wants this service to be started after a reboot he just tells us the name of its startup files and we add those to our startup system. The service is then started with user privileges. the user is able to stop and start the service any time.. is there a way this kind of setup can be configured in systemd? In the long run systemd --user is what you want to be use, but that's not ready yet. systemd for the user is something we want to focus on for the F16 cycle. While the basics are there it is not round and shiny yet. You could hack something up with a service like systemd@.service which would be something like: snip [Service] User=%i PAMName=systemd ExecStart=/bin/systemd --user /snip Then you can simply link this into /etc/systemd/system/multi-user.target/systemd@lennart.service and the user lennart would get his very own systemd instance run at boot, with config files from ~lennart/.config/systemd/user/... They can access this via systemctl --user and similar. We eventually plan to ship a unit like this by default, but we first have to figure out a couple of details. Sorry, if this is a bit disappointing. This is definitely on our todo list, but right now we can just offer you the building blocks, not the product itself yet. Lennart -- Lennart Poettering - Red Hat, Inc. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] user startable services in systemd context
On Fri, 15.04.11 17:42, Marius Tolzmann (tolzm...@molgen.mpg.de) wrote: Hi.. is there a simple or documented way to start a user systemd at boot time? Nope, no docs yet. All still in flux. when i create a unit for systemd --user including the PAM setup a user-systemd gets started under the specified user. - is it intended that there stays a strange process named: sd:pam running as root? seems to be a child of the user-systemd process. Yes, this is necessary to make PAM work. We need to invoke the session shutdown handlers when the service exits, and this is the process we do this with. PAM is a bit weird sometimes. - how can the user manage it's user-systemd with systemctl (--user)? or better: how should a users dbus daemon be setup to get connected to it's systemd. That's the dirty part: this isn't really solved yet. In the long run there will be dbus-daemon --user and systemd --user will just spawn it as needed. In the short run you need to wrap the systemd invocation in a dbus-launch invocation. As said, it's all a bit hacky right now. We will work on a clean solution for F16. Lennart -- Lennart Poettering - Red Hat, Inc. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
[systemd-devel] user startable services in systemd context
Hi again.. we have a setup where every user can start its own services (e.g. a webserver, database server, whatever). if the user wants this service to be started after a reboot he just tells us the name of its startup files and we add those to our startup system. The service is then started with user privileges. the user is able to stop and start the service any time.. is there a way this kind of setup can be configured in systemd? thats what we would like to do: - start services unprivileged (this already works with systemd) - let the user start, stop, restart his service currently the user is able to stop his service (e.g. just kill it) but then systemd complains about a stopped service. if the user starts his service again he starts it in his user session/cgroup which gets moved to the users master session/cgroup after a logout. this is not very nice. so i like to clean this mess up a bit but havn't found much information how this could already be done or if it is even planned to be a possible configuration in the future. bye marius -- Dipl.-Inf. Marius Tolzmann marius.tolzm...@molgen.mpg.de --.-- MPI f. molekulare Genetik | Ihnestrasse 63-73, D-14195 Berlin | == MarIuX GNU/Linux == Phone: +49 (0)30 8413 1709| --^-- God put me on earth to accomplish a certain number of things. Right now I am so far behind.. ..I will never die. by calvin from calvinhobbes ;) ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] user startable services in systemd context
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 ? 2011?04?07? 20:55, Marius Tolzmann ??: Hi again.. we have a setup where every user can start its own services (e.g. a webserver, database server, whatever). if the user wants this service to be started after a reboot he just tells us the name of its startup files and we add those to our startup system. The service is then started with user privileges. the user is able to stop and start the service any time.. is there a way this kind of setup can be configured in systemd? thats what we would like to do: - start services unprivileged (this already works with systemd) - let the user start, stop, restart his service use systemd --user currently the user is able to stop his service (e.g. just kill it) but then systemd complains about a stopped service. if the user starts his service again he starts it in his user session/cgroup which gets moved to the users master session/cgroup after a logout. this is not very nice. so i like to clean this mess up a bit but havn't found much information how this could already be done or if it is even planned to be a possible configuration in the future. bye marius -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.17 (GNU/Linux) iQEcBAEBAgAGBQJNnce8AAoJEKT4Uz7oTANZ8VIIAIrp/ZszRX1/6+M+f1P7fa4J K0UvEwoh37tduu1TXo1q8T2aOV7eTg6HuVwoMPe3HjBOJAyl+lOKf62luAR2PXLS d8xTPiCvr5HW2JZnR9B8iaF5PscHuWtUB+Uk4oAUJ2wTMZOIw0HJ6/OgL2XAYot/ PRmrdIw4n8ogBJRbF4R3083ozb96JOpcdJ1St+iSK4xCaN0EYjwgT/xNrP5zIabj SVjz2W1MFOika8NvA4AMIN+Wz8jV095HcQhvjxJzQ1Flg+Htp++sYjUXFZ+7cN1Y KS3niy5t7w5hXhHkI+MgAB0xzTfiDUmL+BkB9CXJ56yRlQDaqDjbpoZO4XzUZro= =H+/7 -END PGP SIGNATURE- ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel