Client: KEYBASE_ALLOW_ROOT=1 isn't working

Created on 30 Apr 2018  ยท  12Comments  ยท  Source: keybase/client

image

+ export KEYBASE_ALLOW_ROOT=1
+ KEYBASE_ALLOW_ROOT=1
+ sleep 1
+ keybase service
Oops, you are trying to run as an admin user (Uid: 0). This isn't supported.

What am I doing wrong? I'm using the deb from https://prerelease.keybase.io/keybase_amd64.deb

All 12 comments

Hmm, seems to work for me, which version are you running?

#!/usr/bin/env bash
set -ex

export KEYBASE_ALLOW_ROOT=1
keybase service &
sleep 1
keybase oneshot

I'm using the prerelease deb.

Can you do a keybase version for me?

We'll ship a new build today. We had builds paused while we incorporated some big changes. Things are pretty solid mpw, so we're ready to start shipping dailies now.

image

I can't even check the version as root. That's kind of amazing.

You should be able to su anyotheruser -c 'keybase version'.

Try the most recent release?

I'm at I/O. I'll try it as soon as I get back.

On Wed, May 9, 2018, 9:46 AM Maxwell Krohn notifications@github.com wrote:

Try the most recent release?

โ€”
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/keybase/client/issues/11594#issuecomment-387802526,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABHmQTIbxaQqj9e8-xG4MKVxAXGnhBLMks5twx16gaJpZM4Tswjr
.

I'm having the same issue with the most recent deb build (2.3.0-20180703160439.fc6ccd458e).

In my case, it appears that a properly set XDG_RUNTIME_DIR is causing the background service to fail with the "Oops, ... admin user ..." error message. Using unset XDG_RUNTIME_DIR allows the service to run.

[user@ubuntu-001 ~]$ keybase version
Client:  2.3.0-20180703160439+fc6ccd458e
[user@ubuntu-001 ~]$ sudo su -
[root@ubuntu-001 ~]$ run_keybase
Oops, you are trying to run as an admin user (Uid: 0). This isn't supported.
[root@ubuntu-001 ~]$
[root@ubuntu-001 ~]$ export KEYBASE_ALLOW_ROOT=1
[root@ubuntu-001 ~]$ unset XDG_RUNTIME_DIR
[root@ubuntu-001 ~]$ run_keybase
Unmounting /root/keybase...
Shutting down kbfsfuse...
Shutting down keybase service...
Failed to connect to bus: No such file or directory
WARNING: Couldn't reach the systemd user-level daemon.
Falling back to non-systemd startup.
Launching keybase service...
Mounting the file system...
Launching Keybase GUI...
Success!
                                                  โ–„โ–„โ–„โ–„โ–ˆโ–€
โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ          โ–„โ–„          โ–„โ–„โ–„โ–ˆโ–„โ–„โ–€
โ”‚                       โ”‚         โ–ˆโ–ˆโ–ˆโ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–ˆโ–ˆโ–ˆโ–„โ–ˆโ–ˆ
โ”‚  Encrypt everything!  โ”‚       โ–„โ–„โ–„โ–ˆโ–ˆโ–ˆโ–ˆโ–„โ–„โ–„โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ
โ”‚                       โ”œโ”€โ”€โ”€โ”€  โ–„โ–„โ–„โ–„โ–„โ–ˆโ–ˆโ–ˆโ–ˆโ–„โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ      โ–ˆโ–ˆโ–ˆโ–„โ–ˆโ–„โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–„โ–„
                                โ–€โ–„โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–„โ–€ โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–„โ–„
                                  โ–„โ–„โ–„โ–„โ–ˆโ–ˆโ–ˆ    โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–„โ–„
                                 โ–„โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ   โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ
                                โ–„โ–ˆโ–ˆโ–ˆโ–„โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–„โ–„  โ–€โ–„โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ
                               โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–„โ–„โ–ˆโ–ˆโ–„โ–ˆโ–„โ–„ โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ
                              โ–„โ–„โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–„โ–„ โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ
                           โ–„โ–ˆโ–ˆโ–„โ–„โ–ˆโ–ˆโ–ˆโ–ˆโ–„โ–„โ–„โ–ˆโ–„โ–„โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ
                                โ–ˆโ–ˆโ–ˆโ–„โ–„โ–„โ–„โ–„โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–„โ–„โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–„โ–€
                                โ–„โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–„โ–„โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–„โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ
                                โ–ˆโ–„โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ
                              โ–„โ–„โ–„โ–„โ–„โ–ˆโ–ˆโ–„โ–„โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–„โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ
                            โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–„โ–„โ–„โ–„โ–ˆโ–ˆโ–„โ–€ โ–€โ–€โ–„โ–„โ–„โ–„โ–„โ–„โ–€โ–€โ–€
                                  โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€
[root@ubuntu-001 ~]$
[root@ubuntu-001 ~]$ export XDG_RUNTIME_DIR=/run/user/0
[root@ubuntu-001 ~]$ run_keybase
โ–ถ INFO Starting keybase.service.
Job for keybase.service failed because the control process exited with error code. See "systemctl --user status key
base.service" and "journalctl -xe" for details.
โ–ถ ERROR Failed to start keybase.service.
โ–ถ ERROR Error in spawning server process: exit status 1
โ–ถ ERROR exit status 1
[root@ubuntu-001 ~]$
[root@ubuntu-001 ~]$ systemctl --user status keybase.service | cat
โ— keybase.service - Keybase core service
   Loaded: loaded (/usr/lib/systemd/user/keybase.service; disabled; vendor preset: enabled)
   Active: inactive (dead)

Jul 04 17:10:35 ubuntu-001 systemd[1652]: Starting Keybase core service...
Jul 04 17:10:35 ubuntu-001 keybase[81540]: Oops, you are trying to run as an admin user (Uid: 0). This isn't suppor
ted.
Jul 04 17:10:35 ubuntu-001 systemd[1652]: keybase.service: Main process exited, code=exited, status=2/INVALIDARGUME
NT
Jul 04 17:10:35 ubuntu-001 systemd[1652]: Failed to start Keybase core service.
Jul 04 17:10:35 ubuntu-001 systemd[1652]: keybase.service: Unit entered failed state.
Jul 04 17:10:35 ubuntu-001 systemd[1652]: keybase.service: Failed with result 'exit-code'.
Jul 04 17:10:35 ubuntu-001 systemd[1652]: keybase.service: Service hold-off time over, scheduling restart.
Jul 04 17:10:35 ubuntu-001 systemd[1652]: Stopped Keybase core service.
Jul 04 17:10:35 ubuntu-001 systemd[1652]: keybase.service: Start request repeated too quickly.
Jul 04 17:10:35 ubuntu-001 systemd[1652]: Failed to start Keybase core service.
[root@ubuntu-001 ~]$
[root@ubuntu-001 ~]$ export XDG_RUNTIME_DIR=
[root@ubuntu-001 ~]$ run_keybase
Unmounting /root/keybase...
Shutting down kbfsfuse...
Shutting down keybase service...
Failed to connect to bus: No such file or directory
WARNING: Couldn't reach the systemd user-level daemon.
Falling back to non-systemd startup.
Launching keybase service...
Mounting the file system...
Launching Keybase GUI...
Success!
                                                  โ–„โ–„โ–„โ–„โ–ˆโ–€
โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ          โ–„โ–„          โ–„โ–„โ–„โ–ˆโ–„โ–„โ–€
โ”‚                       โ”‚         โ–ˆโ–ˆโ–ˆโ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–ˆโ–ˆโ–ˆโ–„โ–ˆโ–ˆ
โ”‚  Encrypt everything!  โ”‚       โ–„โ–„โ–„โ–ˆโ–ˆโ–ˆโ–ˆโ–„โ–„โ–„โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ
โ”‚                       โ”œโ”€โ”€โ”€โ”€  โ–„โ–„โ–„โ–„โ–„โ–ˆโ–ˆโ–ˆโ–ˆโ–„โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ      โ–ˆโ–ˆโ–ˆโ–„โ–ˆโ–„โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–„โ–„
                                โ–€โ–„โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–„โ–€ โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–„โ–„
                                  โ–„โ–„โ–„โ–„โ–ˆโ–ˆโ–ˆ    โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–„โ–„
                                 โ–„โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ   โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ
                                โ–„โ–ˆโ–ˆโ–ˆโ–„โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–„โ–„  โ–€โ–„โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ
                               โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–„โ–„โ–ˆโ–ˆโ–„โ–ˆโ–„โ–„ โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ
                              โ–„โ–„โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–„โ–„ โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ
                           โ–„โ–ˆโ–ˆโ–„โ–„โ–ˆโ–ˆโ–ˆโ–ˆโ–„โ–„โ–„โ–ˆโ–„โ–„โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ
                                โ–ˆโ–ˆโ–ˆโ–„โ–„โ–„โ–„โ–„โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–„โ–„โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–„โ–€
                                โ–„โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–„โ–„โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–„โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ
                                โ–ˆโ–„โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ
                              โ–„โ–„โ–„โ–„โ–„โ–ˆโ–ˆโ–„โ–„โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–„โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ
                            โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–„โ–„โ–„โ–„โ–ˆโ–ˆโ–„โ–€ โ–€โ–€โ–„โ–„โ–„โ–„โ–„โ–„โ–€โ–€โ–€
                                  โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€

Adding Environment=KEYBASE_ALLOW_ROOT=1 to /usr/lib/systemd/user/keybase.service, followed by a killall keybase ; sleep 1; run_keybase, seems to fix the problem for me (without requiring XDG_RUNTIME_DIR to be null).

+ping @maxtaco

This is still a problem (although the same work-arounds work) with the current newest version:

[user@ubuntu-001 ~]$ keybase version
Client:  2.11.0-20181115195458+06d3f3f3c4

I am also having a similar problem to @rivy, though the XDG_RUNTIME_DIR workaround is not helping, nor is modifying /usr/lib/systemd/user/keybase.service by adding Environment=KEYBASE_ALLOW_ROOT=1. I'm reporting my issue here: https://github.com/keybase/client/issues/14840

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ATCUSA picture ATCUSA  ยท  4Comments

Alexendoo picture Alexendoo  ยท  3Comments

martindevans picture martindevans  ยท  4Comments

qntmpkts picture qntmpkts  ยท  3Comments

shadowfacts picture shadowfacts  ยท  4Comments