jackaudio.github.com icon indicating copy to clipboard operation
jackaudio.github.com copied to clipboard

Permission denied when trying to add username as audio group

Open Dimitry540 opened this issue 3 years ago • 1 comments

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.

Dimitry540 avatar Feb 01 '22 17:02 Dimitry540

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.

Rondore avatar Apr 25 '22 08:04 Rondore