sudo -u needs escaped hash when /usr/lib/pm-utils/sleep.d/01PulseAudio uses bash
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pulseaudio (Ubuntu) |
Fix Released
|
Undecided
|
Daniel T Chen |
Bug Description
Description: Ubuntu 9.04
Release: 9.04
pm-utils:
Installed: 1.2.2.4-0ubuntu4
Candidate: 1.2.2.4-0ubuntu4
Version table:
*** 1.2.2.4-0ubuntu4 0
500 http://
100 /var/lib/
pulseaudio:
Installed: 1:0.9.14-
Candidate: 1:0.9.14-
Version table:
*** 1:0.9.14-
500 http://
500 http://
100 /var/lib/
1:
500 http://
I am using /bin/bash instead of /bin/dash as /bin/sh
=======
Using the command "sudo pm-suspend", only the screen is locked.
This seems to be caused by /usr/lib/
From the /var/log/
+ suspend_pulse
++ get_pulse_users
+++ ps aux
+++ awk '/\/usr\
++ echo 1000
+ for i in '$(get_
+ sudo -H -u 1000 pactl suspend-sink 1
+ sudo -H -u 1000 pactl suspend-source 1
+ hook_exit_status 1
executing sudo -H -u 1000 pactl suspend-sink 1 from a root-console resulted in:
sudo: no passwd entry for 1000!
man sudo told me, that the -u flag has to be used with the username or the uid preceded by an escaped hash symbol (\#)
This does not seem to be the case using dash.
Changing the four occurrences of the sudo -u call in 01PulseAudio solved the problem. This fix does work with dash, too.
Related branches
- Luke Yelavich: Pending requested
Great catch, thanks!