[16:59] jodh: hmm, one point I just noticed in the spec that I'm not too sure about is the D-Bus section on having the user upstart listen on /com/ubuntu/upstart-session/$user [16:59] jodh: I see why we need that so initctl can work until we get a working dbus session [17:00] jodh: but the fact that it's not unique per session is a bit problematic [17:02] jodh: would it work if we use /com/ubuntu/upstart-session/$PID (where $PID is the pid of the user upstart) and export a UPSTART_SESSION environment variable to all children containing the path? [17:04] jodh: it's really only going to be useful for the dbus job as it's likely going to be the only one that'll need to talk directly to upstart as any job after that will be able to use the session bus [17:33] jodh, xnox: alright, I think I'm done with https://wiki.ubuntu.com/FoundationsTeam/Specs/RaringUpstartUserSessions [17:34] feel free to do any additional edits. I'm out to get some food, I'm starving ;) [17:37] stgraber: thanks. I will look through your edits =) [19:55] is there a special way to do a sudo entry to allow a normal user to restart a service? [19:57] when I do something like: "/usr/sbin/service uwsgi *" that doesn't work... I get: /usr/sbin/service: 123: exec: status: not found [19:58] for the command "sudo service uwsgi status" [20:16] LeoSh: what do you mean by "normal user"? [20:16] (also, this sounds like a sudo question, not an upstart question?) [20:17] http://manpages.ubuntu.com/sudoers explains sudo configuration [20:29] @JanC: not root [20:29] I suspect it's more of an upstart question, or at least one upstart users have run into [20:30] the other strange detail is when I do 'service uwsgi' I get 'uwsgi: unrecognized service' [20:30] even though there's a uwsgi.conf in /etc/init/ and it looks like it's all properly formatted (and 'service uwsgi restart' works without any problems) [20:30] not every non-root user has the same rights when using sudo [20:31] LeoSh: what if you use initctl ? [20:32] 'initctl status uwsgi' works fine [20:34] I'm not sure how to do an equivalent of 'service uwsgi' with initctl since it takes the command first [20:35] from the manpage of 'service', that is not a legal use of the service command? [20:36] it mentions "service SCRIPT COMMAND [OPTIONS]" [20:37] which means the command is mandatory? [20:37] unless you are using a different "service" command than I do [20:38] hmm [20:38] that's a good point [20:38] I'm on Ubuntu 12.04 [20:38] I'm on Ubuntu 12.10 right now, but I'm pretty sure 'service' worked the same there [20:39] ok, so 'unrecognized service' is probabl unrelated to my actual issue [20:39] http://manpages.ubuntu.com/manpages/precise/en/man8/service.8.html [20:40] is there a way to control who is allowed to restart a service through upstart? [20:40] http://manpages.ubuntu.com/manpages/precise/en/man5/sudoers.5.html ☺ [20:40] yeah, that leads me to the original question :-/ [20:41] the sudoers config I used works for an init.d script [20:41] but doesn't seem to work for my upstart .conf [20:41] (there are examples at the end of the manpage) [20:43] the sudoers file only cares about users, groups & command lines AFAIK [20:44] hmm [20:44] do I need to open up the other commands in sudoers? (ie. /sbin/start, /sbin/stop, etc.?) [20:45] only if you want to use them like that? [20:45] I don't, but looking at the error [20:45] it refers to /usr/sbin/service:123 [20:45] hm, maybe think about how you define it and how you use it? [20:46] which attempts to exec the action: exec ${ACTION} ${SERVICE} ${OPTIONS} [20:46] and that's what fails [20:46] well, you run service with sudo, right? [20:47] yes [20:48] I get the following if I just try to do "status" as my non-priv user: Command 'status' is available in '/sbin/status' [20:48] if you execute it without an "action", that would probably fail [20:48] and that it can't be located [20:48] which is strange, since it should be running as root rather than the nonpriv user [20:48] but it explains why the init.d version works fine [20:49] it doesn't try to invoke another binary that the nonpriv user doesn't have access to [20:50] is there some really good reason to not add sbin to your path? [20:50] as a nonpriveleged user? [20:50] well, if $ACTION is empty, that would certainly confuse $SERVICE being called as the main application? [20:51] if hey have no proper checking in place :p [20:51] if they* [20:52] here's the core problem [20:52] 'service' is in/usr/bin and 'start' and it's kin are over in /sbin [20:57] if you run 'service' as root (using sudo or otherwise) that shouldn't be a problem [21:00] I do, but it still is [21:01] I think the PATH of the user remains even when you sudo [21:01] that depends on sudo options, but possibly, yes [21:20] ok, yeah, the sudoers file has 'Defaults env_reset' which is recommended... [21:33] LeoSh: I don't have the time to investigate right now, but AFAIK sudo allows you to override that [21:33] JanC: yeah, I appreciate the help, I'm digging into it [21:33] apparently the setting comes from some unholy mix of login.defs and pam config