Skip to content

Permission denied when trying to add username as audio group #156

Open

Description

@Dimitry540

I'm new to linux so bear with me. I'm a newbie musician who is trying to get started with audio production software and I need jack2 to work on my system. When I type this command this is what I get. How do I grant the permission needed for this command to work.

command: usermod -a -G audio userName
usermod: Permission denied.
usermod: cannot lock /etc/passwd; try again later.

Activity

  1. Rondore commented on Apr 25, 2022

    @Rondore

    I hope you have figured out how to run the command by now but if not, here is how you can do it. The usermod command must be run as the root user. If you are coming from Windows, you can think of it as Administrator privilege. There are two ways to run a command as root but only one will likely work on the distribution of Linux you are using. If you set a root password when you installed Linux run "su -" (without quotes) to get a root shell, then run the usermod command you listed in the root shell. Press Ctrl + D to close the root shell. If you did not set a root password, (like Ubuntu, and Fedora) your user can probably use sudo. In this case, run "sudo usermod -a -G audio userName" (again without quotes). You will be asked for the password for the userName account. With sudo, only the single command will be run as root and the shell will still be under userName when it exits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions