I have Ubuntu 12.04 installed on my PC, recently I have edited /etc/passwd and changed


to give root permission to user1 and the system always need to login as root, for running some custom software.

Now it seems the sound is not working, the volume icon is disabled. I understand that the pulseaudio demon can't be run as root that's why the audio is not working. How can I resolve it, like set the permission of pulseaudio to run as root.

When I type the command

 /usr/bin/pulseaudio --start

Giving me the output

W: [pulseaudio] main.c: This program is not intended to be run as root (unless --system is specified).
E: [autospawn] core-util.c: Home directory /home/user1 not ours.
W: [autospawn] lock-autospawn.c: Cannot access autospawn lock.
E: [pulseaudio] main.c: Failed to acquire autospawn lock


Solution for problem:

I have fixed the problem by disable root checking for pulseaudio equalizer

sed -i 's/exit 1/#exit1/g' /usr/bin/pulseaudio-equalizer 
  • Please see This Page
    – MelBurslan
    Mar 21, 2016 at 7:33
  • 1
    you don't need to edit passwd to give root access. Just run sudo useradd user1 sudo Mar 21, 2016 at 7:34
  • Does that required to enter password, for each time for some root operation?.
    – Haris
    Mar 21, 2016 at 7:37
  • @MelBurslan I have run the command adduser user1 pulse-access but still the sound cannot enabled.
    – Haris
    Mar 21, 2016 at 8:12
  • 1
    @Haris Note that if you want to notify someone of a message, you need to put an @ followed by their username. And put information in the question, not comments. Mar 22, 2016 at 5:07

1 Answer 1


“Give root permission to user1” is imprecise. What you actually did was to make user1 an alias for the root user. What determines the identity of a user is the user ID, not the name. The name is just what you type when you log in (that also determines what shell you get and what group you're in, but that's about it). Now “the system always login as root for some reason” — well, yes, the reason is that you are logging in as root.

Some programs don't expect to run as root and won't work properly.

You need to repair the entry in /etc/passwd to give user1 their user ID back. Then change the ownership of all files in user1's home directory back:

find /home/user1 ! -type l -uid 0 -exec chown user1 {} +

Then log out and back in, and your system should work again. Some bad side effects of the current problem may remain; be careful about changing files' permissions and ownership if you don't know exactly what you're doing. If in doubt, ask here.

  • I think you are misunderstand the line the system always login as root for some reason, I have edited the question. Actually this was my requirement to login to the system as root, and I cannot changed that back. Actually I have customized Ubuntu and created a liveISO with a custom app running on it. And the system is working fine for last 8-10 month without any major problem, except the issue like audio. So is there any way to get audio work with root user.
    – Haris
    Mar 22, 2016 at 4:15
  • @Haris Don't run pulseaudio as root. Don't add an entry to /etc/passwd with a UID of 0. If you have some software that must run as root, run that software as root, and only that software. Mar 22, 2016 at 11:50

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