Make-system-user Error: please complete 'snapcraft login' and try again

Hi guys,

I am having a little issue with the running of the make-system-user, in fact I am logged in snapcraft, I can run snapcraft login/logout/keys … but once I run the following command : make-system-user --brand bJzr2XzZg6Qv6Z53dsjhg20975Skjs
–model mymodel --key my-key-name --username
–email --password an error occurs which say that Error: please complete ‘snapcraft login’ and try again. Here’s the snap version I am using : make-system-user 12 26 20/stable canonical✓ classic

Any ideas on the problem ?

I am running into the same problem :frowning:

Hi,

I found a little solution, in fact I analyzed the output of make-system-user and it looked like a signed model assertion so I reproduced the same file using a json file with the new elements. I signed the json file afterwards and I was asked for the passphrase. I get directly to the login screen after rebooting using the USB, but I’m still trying to understand how to embed the password because it has to be in this form “password: $6$aI1yTa47ja/S0mOz$l.UXH1eenatuEF5EiSF6Bh1mhu3/1tcmtge2H4MA5kpPx0Y1hBmrIc/yXX4hEnbbQUudOZJgUeUHSOwRDdLd3/”. I used the rescue mode to modify the user password just to test the auto-import.assert. If anyone knows a bit about this or if the error is solved let us know.

Thanks !

1 Like

I have a script that can generate the password hashes:

import crypt; exit(crypt.crypt("SomePassword", crypt.mksalt(crypt.METHOD_SHA512)))

Run that with python and it will spit out the hashed pass. I lifted it from the make-system-user source.

I was able to generate an assertion using a Json file, but after moving it to a USB, I didn’t seem to get the results I was looking for, basically nothing happened.

I was hoping that make-system-user would do something different and ran into the login issue. If you need help generating the assertion and testing it out with your setup to see if it works for you. I think one of the properties in the json file was incorrect (most likely the brand ID or something.

I am also running into the same problem. “Error: please complete ‘snapcraft login’ and try again.”

@thepenguinmaster, @TheDevd : Any tips on how to solve this?

For those hitting same issue: There is a bug already raised for “this” same issue.

I downgraded snapcraft to 6.X to proceed:

sudo snap remove snapcraft
sudo snap install snapcraft --channel=6.x/stable --classic

the shorter form of these commands (if you already have snapcraft installed) is:

sudo snap refresh --channel=6.x/stable snapcraft --classic
1 Like