Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Dimitry540 opened this issue Feb 1, 2022 · 1 comment
Open

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

Dimitry540 opened this issue Feb 1, 2022 · 1 comment

Comments

@Dimitry540
Copy link

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.

@Rondore
Copy link

Rondore commented Apr 25, 2022

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants