All sudo command give me an "file name is too long" error

So when I type sudo ls or sudo whatever, I get this. I use fish shell, but when I change to another I am getting the same. This is new behavior, since a few days ago. su works, but this does not help me with AUR updates, for example.
I was also unable to start an appimage, giving Fatal Python error: calculate_program_full_path: path configuration: path too long, might be related.

Note, my locale is German, so actually I am getting “Der Dateiname ist zu lang”, so my error message is a translation, it might be different on an English system.

Did you always have this issue? Right when installing Manjaro the first time? If not, do you remember what you last did that might have caused the issue?

I think this is due either from

  • a limit from the filesystem you use
  • a limit from Python (that i don’t know of)

You could also check the associated AUR package’s page for relevant comments.
https://aur.archlinux.org/

Since the day before yesterday maybe. The system had been fine and I did not upgrade any major packages, just a couple of apps like zoom. I also did not touch any system configuration files recently.

Sudo uses python?
File system is ext4.
I cannot imagine this to be the cause.

No.

Are you sure, you’re executing the /usr/bin/sudo binary from sudo package?
Please post the output of

$ which sudo || type sudo
$ pacman -Qkk sudo

If I create another user and log in with this account, even if he is not in the sudoers group, it will also yield the same error.

I am thinking about trying to reinstall sudo, but I am unsure if this is dangerous, possible at all and doubt, this will solve anything.
I also already rebooted enabling the fsck hook in mkinitcpio,

  • /usr/bin/sudo
  • backup file: sudo: /etc/sudoers (Modification time mismatch) backup file: sudo: /etc/sudoers (Size mismatch) sudo: 222 total files, 0 altered files

sudo package seems to check out, /etc/sudoers was changed.

It’s not dangerous, very possible and will solve your problem if (and only if) the problem lies within that changed /etc/sudoers file.

At the moment sudo isn’t working for you - so you have to login as root either on tty or via

$ su - root

Any updates on this? I’m having the same issue now.

sudo: pacman: File name too long
sudo: umount: File name too long

$ which sudo || type sudo
 /usr/bin/sudo
$ pacman -Qkk sudo
sudo: 222 total files, 0 altered files

maybe …

pacdiff -o

Thanks for the response. Here’s the output:

$ pacdiff -o
/etc/profile.pacnew
/etc/shadow.pacnew
/etc/fonts/fonts.conf.pacnew/etc/shadow.pacnew
/etc/security/limits.d/10-gcr.conf.pacnew
/etc/locale.gen.pacnew
/etc/pam.d/tigervnc.pacnew

https://wiki.manjaro.org/index.php/System_Maintenance#Pacnew_and_Pacsave_files

https://wiki.archlinux.org/index.php/Pacman/Pacnew_and_Pacsave

(it may or may not be related)

I ended up running sudo DIFFPROG=diff pacdiff and overwrote the files and I rebooted. After that I could not log in. Both my root and my user accounts password were rejected. I decided at that point to reinstall Manjaro Budgie (I have my /home in a different partition)

After doing so I was able to use sudo again, but the success was short lived. After I restored the .config/fish folder, and made fish my default editor with

chsh -s `which fish`

then logged out, the problem came back again. I’m assuming that is where the problem lies. I’ll update this when I find the problem & solution.

I removed everything out of .config/fish except my config.fish, and sudo started working again. I’ll be looking for the culprit in the rest of the files now.

Yeah, in my case, I also reset fish and it started working again.