Eugeny / tabby

A terminal for a more modern age
https://tabby.sh
MIT License
59.74k stars 3.4k forks source link

sudo not working on Linux #960

Open marcinbojko opened 5 years ago

marcinbojko commented 5 years ago

Version: 1.0.78 Platform: linux 4.18.0-13-generic Plugins: altair, clickable-links, quick-cmds, save-output, scrollbar, shell-selector, theme-gruvbox, title-control

Possible regression with sudo:

sudo: effective uid is not 0, is /usr/bin/sudo on a file system with the 'nosuid' option set or an NFS file system without root privileges?

Funding this issue

Fund with Polar

pauldadin commented 4 years ago

Same here in ubuntu 20.04

stefangweichinger commented 3 years ago

happens again today with terminus-125 on Fedora 33

EDIT: works again, maybe some issue on my system

Tbhesswebber commented 3 years ago

I'm seeing this on a fresh install of Ubuntu 20.04. I am still primarily using alternative emulators because the fact that this happens intermittently is making it so I can't fully shift over

ghost commented 3 years ago

EndeavourOS Linux risksypc 5.11.2-arch1-1 Terminus v1.0.134

$ sudo su
sudo: effective uid is not 0, is /usr/bin/sudo on a file system with the 'nosuid' option set or an NFS file system without root privileges?



sudo works in Alacritty, Konsole and xterm without any problem but doesn't work in Terminus. Only works when I use tmux.

pythoninthegrass commented 3 years ago

Environment

Debian 10 Buster Linux nuc 5.4.78-2-pve (Proxmox) Terminus v1.0.135 (Windows 10 21318.1000)

Issue

sudo doesn't work with either sudo su or sudo -s raising sudo: 1 incorrect password attempt while I'm able to ssh into the same host from cmder (ConEmu) and escalate privileges without issue.

shivdhwaj commented 3 years ago

Ubuntu 20.10 Terminus 1.0.135 sudo - command not working sudo: effective uid is not 0, is /usr/bin/sudo on a file system with the 'nosuid' option set or an NFS file system without root privileges?

Eugeny commented 3 years ago

Please also include which installation method you're using (.deb / .tgz / Snap)

shivdhwaj commented 3 years ago

I have used .deb file

RK-githug commented 3 years ago

Ubuntu 20 with terminus1.0.139. I had this issue after first time install + setup which got me worried because I liked what I saw. The resolve was just a simple restart for me, not sure what went wrong but it is possible it scared off some new users

pacharanero commented 3 years ago

Same problem on 1.0.143 Linux Mint 20.1 Cinnamon, Kernel 5.8 .deb install

pacharanero commented 3 years ago

Sorry, I 'issued' too soon. If you reboot the machine, this seems to solve the problem.

howar31 commented 3 years ago

Still having the issue

Ubuntu 20.04 Tabby 1.0.155 with .deb installation

restart Tabby will fix this issue but it'll happen again later

rapha8l commented 3 years ago

Same for me on Void linux with last release 1.0.157

mempler commented 3 years ago

Still ain't fixed

rapha8l commented 3 years ago

to update my comment, I'm using the tgz

Lateralus138 commented 3 years ago

I used the latest deb installer: [tabby-1.0.158-linux.deb] to install on Ubuntu 20.04 using

sudo dpkg -i Downloads/tabby-1.0.158-linux.deb

in a different terminal and it threw an error, but only because of broken dependencies, no big deal, fixed with a sudo apt --fix-broken and it now runs fine, but it has this issue when trying to run sudo like everyone else here.

I'm liking this terminal so far and it was starting to look better than another one I'm using so I was getting my hopes up until this happened, but this is a big deal. I use sudo often. I love that I have more CSS control though, by the way.

I'll look into this issue at some point.

Edit (Wed 06 Oct 2021 10:57:53 AM CDT): I don't know exactly what happened, but I when I got on my laptop this morning all of a sudden sudo works. I even tried restarting a few times yesterday when I had this issue and it still hadn't worked then, but it sure works now.

CoconutMacaroon commented 3 years ago

I can confirm this: Mode: Downloaded .deb from GitHub Tabby Version: 1.0.161 OS: Ubuntu Desktop 21.10

rapha8l commented 3 years ago

Strange that such a big issue remains unanswered even for a "I don't care"

CoconutMacaroon commented 3 years ago

Strange that such a big issue remains unanswered even for a "I don't care"

(1) If it is so important to you, send a PR with a fix. Tabby is open-source, after all. (2) Someone noted that you can ssh localhost. This isn't ideal, as constantly using that is annoying. However, I realized that you can tell Bash to always proxy sudo over SSH, so everything To do this, add the following to your ~/.bashrc file:

alias sudo="ssh $(whoami)@localhost sudo"

It will 'fix' sudo,so that all sudo commands will be ran over SSH. If you don't want to use a password every time, you can setup an SSH key.

Eugeny commented 3 years ago

Strange that such a big issue remains unanswered even for a "I don't care"

@rapha8l I care a lot for everybody who has issues using my app, however I can't afford to run around posting as much as dedicated project managers in other projects can. There are 500+ open issues and only so much of my free time I can dedicate to working on it.

The reason this hasn't been fixed for so long is that I'm unable to reproduce it on any of my Linux boxes.

There has already been a similar bug in the past, but that was caused due to Chromium's own sandboxing preventing SUID binaries (here, sudo) from getting spawned, but that's been fixed.

Unfortunately the sudo's error message is not helpful at all and without a viable repro, I have no idea where to start.

CoconutMacaroon commented 3 years ago

The reason this hasn't been fixed for so long is that I'm unable to reproduce it on any of my Linux boxes.

There has already been a similar bug in the past, but that was caused due to Chromium's own sandboxing preventing SUID binaries (here, sudo) from getting spawned, but that's been fixed.

Unfortunately the sudo's error message is not helpful at all and without a viable repro, I have no idea where to start.

@Eugeny

Of course, if you are busy, I totally understand. That said, here is exactly what I did to reproduce the issue:

  1. Download Ubuntu Desktop 21.10 from the Ubuntu website
  2. Install it onto a 64 bit machine (using the LiveCD might work, I don't know, but you could try)
  3. Download updates (sudo apt update && sudo apt upgrade)
  4. Download the latest .deb from the Releases
  5. Install the .deb with sudo apt install ./tabby-1.0.XYZ-linux.deb

    It is important that you install with sudo apt install ./file.deb instead of sudo dpkg -i ./file.deb. The second one does different things

  6. Launch Tabby
  7. Type in sudo (by itself), and press enter. Observe that it fails
rapha8l commented 3 years ago

Hi, to be clear, I didn't meant to be rude It's a personnal open source project, and you manage your time as you can, and we can all thank you for what you did Your answer is totally clear and understandable

marcinbojko commented 3 years ago

I haven't had this issue for a long, long long time.

RK-githug commented 3 years ago

Me too, today I upgraded to 161 from 139 (no issues whatsoever). I also tried to replicate the sudo issue on a VM: fresh Ubuntu 20.04 with Tabby 161 via .deb and I had no issues anymore

Eugeny commented 3 years ago

@CoconutMacaroon sorry, it just works for me: image

rapha8l commented 3 years ago

works for me now, thanks

svallory commented 3 years ago

Just download the .deb for 1.0.162, running on Zorin 16 and when I try sudo I get this:

~ 
➜ sudo su
sudo: effective uid is not 0, is /usr/bin/sudo on a file system with the 'nosuid' option set or an NFS file system without root privileges?

➜ ll /usr/bin/sudo
  rwsr-xr-x   1   root   root    162 KiB   Tue Jan 19 11:21:02 2021    sudo 
janiktest commented 2 years ago

quick restart fixed it for me

Lateralus138 commented 2 years ago

quick restart fixed it for me

Same for me as stated above, but it took 2 or 3 restarts.

freeNestor commented 2 years ago

Same issue here, some kind of circumstance causes this we don't known. I suppose it relates to libldap library, because this problem appears several times after my system was upgraded and I messed some libraries for solving another problem , so I restored some libraries and downgrade libldap, this issue doesn't occur a period of time. Hope this may help someone and developers, I'm not sure. I'll keep watching if it disappears. Workaround is restarting it.

Guztaver commented 2 years ago

Same issue, i have solved disabling "Encrypt config file", in vault settings, and Restarted the terminal.

OS: Pop OS 21.10 Mode: GitHub .deb downloaded with wget, installed with dpkg Tabby Version: 1.0.168

jonnyhoff commented 2 years ago

This issue happened intermittently.

When exiting Tabby the below processes still run in the background.

$ ps -eaf|grep tabby
user    7570    3731  0 Dec20 ?        00:00:00 /opt/Tabby/tabby --type=zygote --no-zygote-sandbox --no-sandbox
user    7571    3731  0 Dec20 ?        00:00:00 /opt/Tabby/tabby --type=zygote --no-sandbox

After killing these I'm able to use sudo

pkill tabby

OS: Fedora 35

maxreuben commented 2 years ago

The same issue is present in Fedora 34(Linux 5.15.10-100.fc34.x86_64). Killing the app and restarting did fix it.

This issue happened intermittently.

When exiting Tabby the below processes still run in the background.

$ ps -eaf|grep tabby
user    7570    3731  0 Dec20 ?        00:00:00 /opt/Tabby/tabby --type=zygote --no-zygote-sandbox --no-sandbox
user    7571    3731  0 Dec20 ?        00:00:00 /opt/Tabby/tabby --type=zygote --no-sandbox

After killing these I'm able to use sudo

pkill tabby

OS: Fedora 35

albertoglezba commented 2 years ago

@CoconutMacaroon sorry, it just works for me: image

I have these errors with sudo:

sudo: The "no new privileges" flag is set, which prevents sudo from running as root.
sudo: If sudo is running in a container, you may need to adjust the container configuration to disable the flag.

I think I found a way to replicate them...

image

Whenever Tabby asked me to restart application in order to changes to take effect, I click on that yellow bar, application restart, but suddenly sudo stops working. As pointed out above, killing all process and start Tabby again fix the issue (because exit from toolbar wont kill the PIDs), but it reappears whenever it restarts from that yellow bar.

Eugeny commented 2 years ago

@albertoglezba this is a great find! Does everybody else have the same problem only when restarting from Settings? Or are there other cases where sudo stops working?

RadarExile commented 2 years ago

@albertoglezba this is a great find! Does everybody else have the same problem only when restarting from Settings? Or are there other cases where sudo stops working?

It's the same for me; If I restart from the yellow bar in settings, sudo breaks. If I close and restart normally, everything works.

I'm running AlmaLinux 8.5 on this machine. I'll see if I can confirm on another distribution.

Eugeny commented 2 years ago

Please check whether this build fixes the issue: https://github.com/Eugeny/tabby/actions/runs/2336887615

GitHub
set --no-sandbox when relaunching on Linux · Eugeny/tabby@f1d9116
A terminal for a more modern age. Contribute to Eugeny/tabby development by creating an account on GitHub.
albertoglezba commented 2 years ago

Please check whether this build fixes the issue: https://github.com/Eugeny/tabby/actions/runs/2336887615

GitHubset --no-sandbox when relaunching on Linux · Eugeny/tabby@f1d9116A terminal for a more modern age. Contribute to Eugeny/tabby development by creating an account on GitHub.

Sorry Eugeny, no fix for me, still sudo broken

Captura desde 2022-05-18 23-25-06

--no-sandbox is set but sudo still not working after restart

Captura desde 2022-05-18 23-18-56

GitHub
set --no-sandbox when relaunching on Linux · Eugeny/tabby@f1d9116
A terminal for a more modern age. Contribute to Eugeny/tabby development by creating an account on GitHub.
TimaGribanov commented 2 years ago

Does everybody else have the same problem only when restarting from Settings? Or are there other cases where sudo stops working?

Met this today on 1.0.182 (Ubuntu 22.04.1 LTS). I never had this issue before, but it appeared after clicking on the yellow bar to restart.

Re-opened Tabby the usual way, and sudo works perfectly.

UPD: I've checked that the'-no-sandbox` flag is set. Any change followed by clicking on the yellow bottom bar results in this bug. Changes with manual relaunch are bug-free.

1

skqist225 commented 2 years ago

If you're using tmux (screen may also work?), here's another workaround:

As another alternative, you can ssh localhost. That spawns a new shell that's not a child of Terminus/Electron, so you can sudo from there.

I don't even know we can use ssh with localhost, but it works perfectly. Thank you

lolomin commented 1 year ago

Same problem here for me under Fedora 37, Tabby restarted through the Yellow bar and sudo or su did not work anymore.After killing all Tabby processes manually : sudo or su - is working back as normal.

refactorized commented 1 year ago

hey just came here via google to check why my new fav term seems to be in sandbox mode, but I too had just restarted via settings. A quick killall tabby (from within tabby itself, which feels... awkward) fixed it right up!

paisley commented 1 year ago

I just wanted to confirm the fix from @albertoglezba worked for me on Linux Mint 21.1 Vera (cinnamon) with Tabby 1.0.189.

thywyn commented 1 year ago

I'm on 1.0.196 and ubuntu 23.04... Issue after the ask of restarting after settings change sudo gets the "if you are in a container" error. Confirmed that killall workaround fixes issue

wurenny commented 3 months ago

So in the end: the problem is caused by the yellow restart bar(when you update some config that need restart). because tabby processes do not all exit before restart The solution is a manual restart once again

sunTFly commented 1 month ago

Manually restart the computer