withfig / fig

Public issue tracker for Fig.
https://fig.io
MIT License
2.06k stars 63 forks source link

bug: apt update gives: runuser: user ubuntu ubuntu does not exist or the user entry does not contain all the required fields #2162

Open kurucu opened 1 year ago

kurucu commented 1 year ago

Checks

Operating system

Ubuntu 22.04

Expected behaviour

I expected apt-get update to update fig without errors.

Actual behaviour

Error shown as follows:

Preparing to unpack .../0-fig-headless_2.10.1_arm64.deb ... Uninstalling additional components... runuser: user ubuntu ubuntu does not exist or the user entry does not contain all the required fields runuser: user ubuntu ubuntu does not exist or the user entry does not contain all the required fields error: Failed to uninstall properly Unpacking fig-headless (2.10.1) over (2.10.0) ...

Steps to reproduce

No response

Environment

fig-details:
  - 2.10.1
hardware-info:
  - model: 
  - model-id: 
  - chip-id: 
  - cores: 2
  - mem: 0.90 GB
os-info:
  - kernel: 5.15.0-1026-aws
  - distro: "Ubuntu"
  - distro-version: "22.04.1 LTS (Jammy Jellyfish)"
environment:
  - shell: /usr/bin/bash
  - terminal: <unknown>
  - cwd: /home/ubuntu
  - exe-path: /usr/bin/fig
  - install-method: unknown
  - env-vars:
    - SHELL: /bin/bash
    - FIG_SET_PARENT_CHECK: 1
    - XDG_SESSION_TYPE: tty
    - TERM: xterm-256color
    - FIG_PID: 1064
    - PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/ubuntu/.local/bin:/home/ubuntu/.fig/bin
    - FIG_PARENT: 96b6db4f-0457-41fa-b4ea-b68d3a8b2b79
grant0417 commented 1 year ago

Hey @kurucu, is the main user account on your computer ubuntu?

This appears to be some issues with sudo but I'm not 100% sure.

kurucu commented 1 year ago

Yep!

On 20 Dec 2022, at 2:52 am, Grant G @.***> wrote:

Hey @kurucu https://github.com/kurucu, is the main user account on your computer ubuntu?

— Reply to this email directly, view it on GitHub https://github.com/withfig/fig/issues/2162#issuecomment-1357874448, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIGBKYNKMZXPPF2IVP5KOLWOCAD7ANCNFSM6AAAAAATCIWULE. You are receiving this because you were mentioned.

macikanas commented 7 months ago

trying switch from root to user, but it says: "user .... does not exist or the user entry does not contain all the required fields" This happened after i upgraded to ubuntu 22.04

macikanas commented 7 months ago

Do you have any idea how to figure out what is my username?

sschamp commented 6 months ago

Hoping this helps at least 1 person.

I never stated I wanted fig to auto-install. Since an update a couple of weeks ago it started prompting me on each ssh login, to install fig. I accidentally hit enter and, since it used the nice Dark Pattern of having yes be default, it just started installing fig, on a production server! Uninstalling it, just reinstalls it when you ssh back into the server...

Figured out where this bug comes from. I ran the uninstaller through strace: strace -o fig_uninst -y -f -s10240 fig uninstall

The uninstaller in turn runs: /usr/bin/users

But, there is a difference between running it like a regular user, and via (presumable) sudo.

$ users
ubuntu
$ sudo users
ubuntu ubuntu

And if you then login to yet another shell, you get:

$ sudo users
ubuntu ubuntu ubuntu

Running the uninstaller now:

Uninstalling additional components...
runuser: user ubuntu ubuntu ubuntu does not exist or the user entry does not contain all the required fields
runuser: user ubuntu ubuntu ubuntu does not exist or the user entry does not contain all the required fields
error: Failed to uninstall properly
bash: /usr/bin/fig: No such file or directory

What fixed it for me was just logging in as root and uninstalling:

ssh root@XXX fig uninstall

A real shame that such a bug still exists. Don't use the users command, just use id

Also fig does not properly uninstall... I had to run rm -rf ~/.fig/ ~/.fig.dotfiles* ~/.local/share/fig/ on both root and ubuntu users. And had to clean it from ~/.ssh/config.

And then when I logged in again, it just started installing fig once more. Utter garbage!

Removed fig from my Mac and logged back in to the server, only to be greeted with:

Last login: XXX
Command 'fig' not found, did you mean:
  command 'kig' from snap kig (23.08.3)
  command 'fis' from deb redboot-tools (0.7build4)
  command 'rig' from deb rig (1.11-1.1)
  command 'wig' from deb wig (0.6-2)
  command 'pig' from deb bsdgames (2.17-29)
  command 'tig' from deb tig (2.5.1-1)
  command 'fid' from deb id-utils (4.6.28-20200521ss15dab)
  command 'dig' from deb bind9-dnsutils (1:9.18.18-0ubuntu0.22.04.1)
  command 'xfig' from deb xfig (1:3.2.8b-1)
  command 'kig' from deb kig (4:21.12.3-0ubuntu1)
  command 'fio' from deb fio (3.28-1)
  command 'fim' from deb fim (0.5.3-9)
See 'snap info <snapname>' for additional versions.
Command 'fig' not found, did you mean:
  command 'kig' from snap kig (23.08.3)
  command 'tig' from deb tig (2.5.1-1)
  command 'pig' from deb bsdgames (2.17-29)
  command 'fis' from deb redboot-tools (0.7build4)
  command 'fio' from deb fio (3.28-1)
  command 'xfig' from deb xfig (1:3.2.8b-1)
  command 'kig' from deb kig (4:21.12.3-0ubuntu1)
  command 'dig' from deb bind9-dnsutils (1:9.18.18-0ubuntu0.22.04.1)
  command 'wig' from deb wig (0.6-2)
  command 'fim' from deb fim (0.5.3-9)
  command 'rig' from deb rig (1.11-1.1)
  command 'fid' from deb id-utils (4.6.28-20200521ss15dab)
See 'snap info <snapname>' for additional versions.
Command 'fig' not found, did you mean:
  command 'kig' from snap kig (23.08.3)
  command 'fis' from deb redboot-tools (0.7build4)
  command 'fim' from deb fim (0.5.3-9)
  command 'fio' from deb fio (3.28-1)
  command 'kig' from deb kig (4:21.12.3-0ubuntu1)
  command 'rig' from deb rig (1.11-1.1)
  command 'tig' from deb tig (2.5.1-1)
  command 'pig' from deb bsdgames (2.17-29)
  command 'xfig' from deb xfig (1:3.2.8b-1)
  command 'fid' from deb id-utils (4.6.28-20200521ss15dab)
  command 'wig' from deb wig (0.6-2)
  command 'dig' from deb bind9-dnsutils (1:9.18.18-0ubuntu0.22.04.1)
See 'snap info <snapname>' for additional versions.
Command 'fig' not found, did you mean:
  command 'kig' from snap kig (23.08.3)
  command 'tig' from deb tig (2.5.1-1)
  command 'fio' from deb fio (3.28-1)
  command 'kig' from deb kig (4:21.12.3-0ubuntu1)
  command 'fid' from deb id-utils (4.6.28-20200521ss15dab)
  command 'dig' from deb bind9-dnsutils (1:9.18.18-0ubuntu0.22.04.1)
  command 'xfig' from deb xfig (1:3.2.8b-1)
  command 'wig' from deb wig (0.6-2)
  command 'fis' from deb redboot-tools (0.7build4)
  command 'pig' from deb bsdgames (2.17-29)
  command 'fim' from deb fim (0.5.3-9)
  command 'rig' from deb rig (1.11-1.1)
See 'snap info <snapname>' for additional versions.

Are you kidding me?! Nothing got properly cleaned up..

Completely removed it everywhere, since blatant issues like this are not being picked up. Also not even going to consider Amazon CodeWhisperer. If this is how little you cared.