Sudo command passowrd not working for some commands

I tried using the “sudo” command for running a .jar file, and entered my password, but it won’t accept it, however, it works if I (for example) were to install anything with the sudo pacman command.

sudo is sudo, it doesn’t have different password prompt when you run jar files. Are you sure your account isn’t temporarily locked?

If not, can we see the actual error message you are receiving?

How exactly are you running this .jar file? What command do you type into the terminal?

It just says “Sorry, try again” for the first two times, and for the third time, it tells me that I failed typing the password 3 times, I tried the command again, before this message, and now it says its unable to access the .jar file.

Here is the following command: sudo java -jar /home/(my_user)/Documents/(Name).jar
Edit: I changed the directory, and I had a “/” after .jar, that might’ve effected it, it now works

1 Like

If you type sudo ls does it work?

Yeah, and I also found my issue, also dumb question, is there a way to disable the sudo password for custom .desktop files? Because they won’t run unless I turned on the “Run in terminal” to insert my password

What java program are you running? Does it really need sudo?

1 Like

Oh. It works without sudo, my bad. Thanks though

In general, only use sudo when you absolutely need it.

Never run programs with GUI with sudo.

Using sudo where it is not needed can break permissions on your system and make other programs work incorrectly. And if the program you’re running with sudo has any malicious features, you are giving it permission to do whatever it wants with your computer, including installing rootkits.

So, the point is, be very careful with sudo.

1 Like

Ah, I see, gonna keep that in mind, thank you!

1 Like


Thanks for giving EndeavourOS a try, and welcome to the forum. I hope you enjoy your time here.



This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.