Public bug reported: Description of the problem: If the user is using the service command they are almost certainly trying to control system daemons but can wind up looking at only user session daemons.
Steps to reproduce: 1. Install KUbuntu 14.04. 2. Graphically log in as a regular user. 3. Run service ufw status Expected result: To be told whether the ufw service is running. Actual result: status: Unknown job: ufw How reproducible is this problem: It happens every time. Additional information: The issue arises because UPSTART_SESSION is set which makes initctl think it should use a user session. If UPSTART_SESSION is cleared away (which happens when using sudo) then this problem isn't encountered when using the service command. However, if the user just uses su then the UPSTART_SESSION can be inherited and even though the user is root they can't find the services they are expecting. One way round this would be to make the service command always use the system session because it's highly unlikely someone is using it to access user sessions. This is related to bug #1318679 and there are reports of this problem scattered over the place (see bug #1367214 , http://stackoverflow.com/questions/30568905/ubuntu-when-upstart-service- is-run-with-user-root-it-returns-unknown-job , http://stackoverflow.com/questions/26137834/starting-docker-as-daemon- on-ubuntu , http://serverfault.com/questions/282433/status-unknown-job- smbd , http://unix.stackexchange.com/q/120050 ...). I personally saw it when trying to install samba after using su to become root. Version information: Ubuntu 14.04.3 LTS sysvinit-utils 2.88dsf-41ubuntu6.3 ** Affects: sysvinit (Ubuntu) Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to sysvinit in Ubuntu. https://bugs.launchpad.net/bugs/1605290 Title: Please add --system to initctl calls from service Status in sysvinit package in Ubuntu: New Bug description: Description of the problem: If the user is using the service command they are almost certainly trying to control system daemons but can wind up looking at only user session daemons. Steps to reproduce: 1. Install KUbuntu 14.04. 2. Graphically log in as a regular user. 3. Run service ufw status Expected result: To be told whether the ufw service is running. Actual result: status: Unknown job: ufw How reproducible is this problem: It happens every time. Additional information: The issue arises because UPSTART_SESSION is set which makes initctl think it should use a user session. If UPSTART_SESSION is cleared away (which happens when using sudo) then this problem isn't encountered when using the service command. However, if the user just uses su then the UPSTART_SESSION can be inherited and even though the user is root they can't find the services they are expecting. One way round this would be to make the service command always use the system session because it's highly unlikely someone is using it to access user sessions. This is related to bug #1318679 and there are reports of this problem scattered over the place (see bug #1367214 , http://stackoverflow.com/questions/30568905/ubuntu-when-upstart- service-is-run-with-user-root-it-returns-unknown-job , http://stackoverflow.com/questions/26137834/starting-docker-as-daemon- on-ubuntu , http://serverfault.com/questions/282433/status-unknown- job-smbd , http://unix.stackexchange.com/q/120050 ...). I personally saw it when trying to install samba after using su to become root. Version information: Ubuntu 14.04.3 LTS sysvinit-utils 2.88dsf-41ubuntu6.3 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/sysvinit/+bug/1605290/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp