Remove the default user Pi

I have zymbit key setup with Luks encryption in Raspberry Pi 3 Model B+ with Rasbian Buster OS. This works without problem but when I remove the the default raspberry user Pi and added my own root user the zymbit key will not bind (light blinking rapidly) but the OS still boot with the encrypted volume.

I need to remove the default user Pi. How do I get this to work ?

Hi Albert, this doesn’t sound right as I’m doing the same thing and it’s been working for me for few months now across many units. Are you sure you’re running Phase 1 and Phase 2 from the root account (via sudo)… In my case I sudo su to gain root terminal for all the zymkey setup stuff…

hope this helps,
Richard

I guess that could be the root cause of the problem not doing a sudo su but using pi to install and then adding a new user and removing pi is a no go.

I suggest zymbit put a font size 42 bold on the need to install the package via sudo su wasted a few hours on why it does not work.

We’ve had no issues with this in our testing. Scripts install fine using instructions as per getting started/encryption guide. Removing pi user and making a new user is a mutually exclusive operation that has no bearing on zymkey components.

Which version of Raspbian are you using? Desktop or lite?

The initial install of Zymbit software is as follows:

  1. Burn the Raspbian Buster image to a SD (16GB) with ssh option (drop the file ssh in the boot partition)
  2. Boot Raspberry Pi with the SD card
  3. Login with the default user pi and password via ssh
  4. install OS update and upgrade (sudo apt-get update and sudo apt-get upgrade)
  5. Install Zymbit hardware and software as per instruction.
  6. Install Zymbit Luks encryption as per instruction.
  7. Change the username and password and reboot
  8. Zymbit zkifc service is not loaded, even the zkifc.service is missing from the /lib/systemd/system directory.

Note: Rasbian Buster Lite version September 2019

Will Zymbit work with all Linux distributions on Pi 4 or only Raspbian?

The first attempt to convert the SD card requires 2 reboots which are done automatically. Are you sure that you have been through both reboot cycles? The fact that zkifc.service is missing looks like you have ssh’ed in during the second reboot cycle.

Another question is: how are you changing the username and password? sudo adduser <newuser> followed by sudo deluser pi?

We currently support Raspbian Buster and Ubuntu 18.04 x64. In theory, either of these repos may line up with other Debian derived distros.

Is there a particular distro you’re interested in?

I have done that 5 different times. If i do not change the user name it works perfectly. I can do a reboot cycle 10 times in a row without problem. The zkifc service will be missing after reboot when the default pi user name is changed.

@Albert From above:

Another question is: how are you changing the username and password? sudo adduser <newuser> followed by sudo deluser pi?

Well I am using the following commands

sudo passwd root
logout
usermod -l newname pi
usermod -m -d /home/newname newname
passwd
sudo apt-get update
sudo passwd -l root

OK, thanks. We’ll give that a try here.

@Albert
I am seeing no issues. For reference, I am using the latest release of Raspbian Buster dated Feb 5, 2020 (2020-02-05). Also, I updated/upgraded to the latest before starting the Zymkey installation and the encryption script.

Then, I performed your steps with modifications in bold:

  1. sudo passwd root
  2. logout
  3. login as pi
  4. sudo usermod -l newname pi
  5. sudo usermod -m -d /home/newname newname
  6. passwd
  7. sudo apt-get update
  8. sudo passwd -l root