Score:0

Usermod: permission denied

gl flag
jrg

When I try to use a usermod command to add me to the sudoers file but it says usermod: permission denied usermod: cannot lock /etc/passwd try again later. When I search things up it told me to add me to sudoers and I need to use usermod but I need usermod access which requires me to be in sudoers file to setup.

kanehekili avatar
zw flag
use `sudo usermod` - this ain't windows ;-) If you don't have sudo rights, ask you admin or change to su ..
gl flag
jrg
Did you read the thing, I can’t be added to sudoers file even if I try
kanehekili avatar
zw flag
well, if i try to execute usermod I get excactly the error you've mentioned. Usually you do not need to alter the sudoers file
Score:0
cn flag

You'll need to use visudo to edit the sudoers file.

To access it, you'll need to be root. You'll also need to edit this file with visudo which in Ubuntu is linked to the nano editor.

$ visudo
visudo: /etc/sudoers: Permission denied
$ sudo su -
[sudo] password for your_current_user_name: 
root@ # visudo 

visudo is used for safety sake to avoid making a mistake that could completely foul up your system.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.