How to solve package installation problems and grant permissions to files.

Hello Recently 2 days ago I installed Linux, "Linux mint 21.1" The first day what I did was just update my repositories with the command. sudo apt upgrade

The next day that I wanted to install DNSmasq I find that the password is incorrect. The only password I have is what When trying to modify some rules of




use commands





But I can neither modify rules nor use the commands because everything tells me that the password is incorrect. I'm thinking of modifying this from grub, but I don't know how I could do this. My other question is that if these are due to package updates, the repositories are from ubuntu, I know this through the graphical interface that indicated the repositories, which linux mint used.

  • 1
    the password is incorrect. which one? you can clearly log in to your system so that password seems correct, so which password is "incorrect"? Apr 29, 2023 at 5:16
  • 1
    How did you modify /etc/passwd, /etc/shadow, and /etc/sudoers? These are really important system files. Please tell us in your question what commands you used and what exactly you changed Apr 29, 2023 at 6:58
  • When I log in through the graphical interface to the desktop I write my password which is q But in the terminal I can't enter that password using sudo, su- therefore I can't change any rules of a file. Apr 29, 2023 at 17:11
  • I haven't modified anything, I just updated the repositories, but then nothing could be downloaded from the repositories, and in several tutorials it mentions modifying the /etc/passwd, /etc/shadow, and /etc/sudoers files I wanted to edit but it shows me that the operation cannot be performed, I cannot read write or execute Apr 29, 2023 at 17:20

1 Answer 1


sudo by itself doesn't do anything, you should see a usage message.

su- should give you a command not found error.

Since sudo apt upgrade worked, you must be in a group with sudo-privileges and the password must be correct.

Try sudo apt install dnsmasq ...

You must log in to answer this question.

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