5

I'm trying to create a System-Wide PulseAudio daemon (I am aware of the security problems associated with that). However, I'm getting an access-denied error when playing through the PulseAudio daemnon (as root). I think it may be because the root user is not in the pulse-access group.

I tried adding it:

adduser root pulse-access

Which, unfortunatly gives me back this error:

addgroup: group 'root' in use

I am running on a small BusyBox, which doesn't has the fancier useradd, etc. commands.

Why can't I / How should I add a user to a specific group, having only access to these two commands?

Running PulseAudio as System-Wide Daemon https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/SystemWide/

2
  • 3
    Does your busybox have a usermod command? Oct 10, 2017 at 14:17
  • no, not present..
    – svenema
    Oct 10, 2017 at 16:02

1 Answer 1

3

BusyBox may be compiled with FEATURE_ADDUSER_TO_GROUP disabled (default behaviour of buildroot-2017.08). If that's the case addgroup or adduser cannot be added to a group. At least in theory, because when I enabled the feature I still got the same error.

Easy solution: just edit /etc/group directly, and add the user there yourself. For example:

pulse-access:x:1003:pulse,root

When doing it for a buildroot build, you may want to add this in the fakeroot scripts step:

# Add root user to pulse-access group
if [ -e ${TARGET_DIR}/etc/group ]; then
    sed -i '/^pulse-access:/s/\(.*\)/\1,root/;s/:,/:/' ${TARGET_DIR}/etc/group
fi

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .