Running make-system-user on 18.04 host

I recently upgraded my desktop to 18.04, and am trying to generate a system user assertion using the make-system-user snap from @kyleN. On 16.04 that worked fine, but it now fails with

/usr/bin/python3: /snap/core/current/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.25' not found (required by /usr/bin/python3)

since it appears the libc6 version that ships with 18.04, namely 2.27, is too new. I’m not too keen to downgrade just so I can run this. What options do I have?

By the way I get the same using make-system-user from both the stable and beta channels. Oddly, the edge channel has a 25MB snap (as opposed to 8kB in the others), which simply says

sudo: make-system-user.run: command not found

Any pointers?

Hi Svet.

I did push a change that requires 18.04 LTS Bionic. I need to clarify this.

Interesting. I realized that for the edge channel, the command needed to run the script has changed from make-system-user.run to simply make-system-user.

That said, on my 18.04 desktop running that still fails with

error: cannot sign assertion: cannot sign using GPG: /usr/bin/gpg --personal-digest-preferences SHA512 --default-key 0x[something] --detach-sign failed: exit status 2 ("gpg: WARNING: unsafe ownership on homedir '/home/user/.snap/gnupg'\ngpg: signing failed: No such file or directory\ngpg: signing failed: No such file or directory\n")
Done. You may copy auto-import.assert to a USB stick and insert it into an unmanaged Core system, after which you can log in using the username and password you provided.

It does produce an output file but it appears to be incomplete. Maybe the solution is obvious - I can’t say I’ve tried to troubleshoot further.

On the whole I think I’ve learned my lesson: which is that I should just stick to 16.04 for building stuff. Everything seems to work fine there :slight_smile:

Is there any update on this issue?

make-system-user rev 15 version 8 is now on channel edge (for amd64).

It’s built using core18 as a base, and it includes various code that it used to assume was present on the system, so it is larger than the current stable rev.

If anyone cares to verify it on bionic (18.04) and let me know, I’ll release to stable if all is well.

I get the exact same error and I am working on Ubuntu 20. Is there is working version which works on U20? @kyleN @svet.

Although it generates a .assert file. It never works.

I am using revision 26 [1] on Ubuntu Desktop 20.04 amd64, and it works fine.

I have found export GPG_TTY=$(tty) resolves the snap sign issue. Does that work for you?

[1] latest/stable: 12 2021-08-09 (26) 6MB classic

after i did that I am not able to run the command make-system-user.

It giver an error Error: You do not appear to be logged in. Try ‘snapcraft login’, even if i am logged in

You should be able to login and logout and show login status for snapcraft with snapcraft login|logout|whoami.

I did, and snapcraft whoami also shows that i am logged in. But make-system-user displays that i am not. :sweat_smile:

Did you ever mention which revision of the make-system-user snap you are using?

Hi, I am using latest/stable: 12 2021-08-09 (26) 6MB classic. This issue started only after i added export GPG_TTY=$(tty). Before that it used to give

error: cannot sign assertion: cannot sign using GPG: /usr/bin/gpg --personal-digest-preferences SHA512 --default-key 0x[something] --detach-sign failed: exit status 2 ("gpg: WARNING: unsafe ownership on homedir '/home/user/.snap/gnupg'\ngpg: signing failed: No such file or directory\ngpg: signing failed: No such file or directory\n")

make-system-user requires you to enter the login credentials on every execution. If that is what you are referring to then it is not a bug. Can you clarify the issue you are having?

So when I run make-system-user -b <> -m <> -k <> -p <> -u <>

it displays : “Error: You do not appear to be logged in. Try ‘snapcraft login’”

and when i run snapcraft whoami, it displays that i am logged in

Can you please run the following and copy/paste the output:

snap list make-system-user

Name              Version  Rev  Tracking       Publisher  Notes
make-system-user  12       26   latest/stable  knitzsche  classic

Hi @kyleN,

I tried running it again today and it returned:

error: cannot sign assertion: cannot sign using GPG: /usr/bin/gpg --personal-digest-preferences SHA512 --default-key 0xAECDB62C038387BBB73B13751D334B946F1C0107 --detach-sign failed: exit status 2 (“gpg: WARNING: unsafe ownership on homedir ‘/home/rahul/.snap/gnupg’\ngpg: signing failed: No such file or directory\ngpg: signing failed: No such file or directory\n”) Done. You may copy auto-import.assert to a USB stick and insert it into an unmanaged Core system, after which you can log in using the credentials you provided.

Exiting.

Hi, Based on the above, I think you were not at rev 26 but now you are, which is good. Now, try the following:

Then execute make-system-user in that terminal.

Hi,

I tried following these steps and I get the same error

“error: cannot sign assertion: cannot sign using GPG: /usr/bin/gpg --personal-digest-preferences SHA512 --default-key 0xAECDB62C038387BBB73B13751D334B946F1C0107 --detach-sign failed: exit status 2 (“gpg: WARNING: unsafe ownership on homedir ‘/home/rahul/.snap/gnupg’\ngpg: signing failed: No such file or directory\ngpg: signing failed: No such file or directory\n”) Done. You may copy auto-import.assert to a USB stick and insert it into an unmanaged Core system, after which you can log in using the credentials you provided.”