doc: "changing user" su example should note system accounts

Bug #907067 reported by Chris Adams on 2011-12-20
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Upstart Cookbook
James Hunt

Bug Description

The documentation at uses an example for pre-1.4 Upstarts which does the following:

  exec su -c command myuser
end script

For system accounts where the default shell is /bin/false, this will simply quietly exit rather than running the command. The solution is trivial:

  exec su -s /bin/sh -c command myuser
end script

Clint Byrum (clint-fewbar) wrote :

Redirecting to the upstart-cookbook project.

While su is generically usable, start-stop-daemon, on Ubuntu systems, would also work well as it is a bit simpler and more designed for this purpose.

Its also good to note that the latest release of Upstart obviates the need for this, as it has new stanzas for setting the uid/gid.

affects: upstart → upstart-cookbook
Changed in upstart-cookbook:
status: New → Confirmed
importance: Undecided → Medium
James Hunt (jamesodhunt) on 2012-04-18
Changed in upstart-cookbook:
assignee: nobody → James Hunt (jamesodhunt)
status: Confirmed → In Progress
James Hunt (jamesodhunt) on 2012-04-26
Changed in upstart-cookbook:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers