Bug #1637

Cannot Delete 1st Admin User (ARM)

Added by bigfoot65 almost 7 years ago. Updated almost 7 years ago.

Target version:
Start date:
Due date:
% Done:



The default admin user amahi cannot be deleted.

Added another user and made it admin. Then logged in as that user and tried to change the admin status of the amahi user. The check mark does not clear. Trying to delete the user is not available as a result.

Checking the production log, I do see this but not sure if it means anything.

Started PUT "/tab/users/users/1/toggle_admin" for at 2015-03-14 11:43:27 -0400
Processing by UsersController#toggle_admin as JSON
  Parameters: {"id"=>"1"}
Completed 422 Unprocessable Entity in 242ms


#1 Updated by cpg almost 7 years ago

  • Description updated (diff)

That ouput (which i re-formatted using a "pre" block, fyi) is somewhat useful.

What that means is that either the user doing it was not admin (which should not be the case), or that the user has not been initialized properly (the crypted password is NULL or blank).

It's possible that one of the users is not initialized properly and that is why it's failing. We will keep it open for now, but the history of how this system was initialized and the dashboard bootstrapped could well be at play.

#2 Updated by bigfoot65 almost 7 years ago

The default user, amahi, that was part of the ARM image may not have been created correctly.
I could flip the flag in the database and probably delete it. I just wanted to point this out in case it was a bug.

#3 Updated by bigfoot65 almost 7 years ago

I found the issue. When the amahi user was created, the name was not completed so it was blank.

I updated the hda_production database, users table to include the name of amahi. Once I did that, I was able to remove the admin check mark and delete the user.

Mystery solved. Not sure how Frans was able to create the amahi user without the name. It should have reflected it was mandatory and now allowed the user to be created without it being completed.

That is one thing that will need changed on the ARM image for future iterations.

#4 Updated by eFfeM almost 7 years ago

Thanks for reporting and digging into this.
This is probably due to the way I created the image.

I think I can explain what happened.
The standard fedora arm image only contained a root user which had the password not set.
I installed the image, gave root a password and also created a non-root user which I called amahi which I gave a password but probably no user name (I used adduser to do so).
(actually I also configured for passwordless ssh but that was not needed).

This was done because bigfoot had problems getting into the image, so as a test I tried to open a few doors.

If amahi should be able to delete users that it did not create itself it should allow that those users do have an empty fullname as this can happen (also on x86) when the user has been created outside amahi.

#5 Updated by bigfoot65 almost 7 years ago

  • Status changed from New to Assigned

I think if you could make a new image, but this time include the name "amahi" when you create the user, it would work fine.

Also, is there RPM tools installed? There should not be for a standard Amahi 8 Image in my opinion. It should contain the least amount of packages needed and then add the Amahi required ones.

Once done, just having to do hda-install CODE should be simple enough to get it working.

The smaller the image, the better. We should be able to compress is using zip to make it smaller for download. I have seen that with many ARM images.

#6 Updated by eFfeM almost 7 years ago

I will check if the rpm tools are installed.
This image was started using the Fedora Minimal image.
It might also be that these rpm tools are dragged in by a dependency in hda-ctl or hda-platform. I did not change anything in that area.
I'll get back to this (could take a week or so as I am away for the weekend)

#7 Updated by bigfoot65 almost 7 years ago

The 31Mar2015 F21 ARM image does not have a default .bashrc for the Amahi user. This is typically created by default when the user is created.

Recommend adjusting the creation of the Amahi user in future builds to accommodate for this feature.

Also available in: Atom