Page MenuHomeVyOS Platform

Config migrate to image upgrade does not properly generate home directory
Closed, ResolvedPublicBUG

Description

When upgrading from 1.4-rolling-202308220020 -> 1.5-rolling-202310080024 using add system image, my custom user account 'admin' does not get the home directory properly created/migrated. When logging in after rebooting into the upgraded image, none of the show or other vyos commands would work, just typical linux commands. Copying the .bashrc from /root with sudo, changing file ownership, and then sourcing that helped get it back into temporary operation. I then had to create a temporary user, log in with that new user, then delete the old user, move/remove the 'new' old user home directory, and recreate the old user. Once logged back in with the recreated user, commands worked as expected, and they worked fine on the temporary user as well. I was not able to test if this worked with the default 'vyos' user because that user no longer existed on my install.

Below is an approximation of the home directory when initially logged in after reboot to the new image:

drwxr-xr-x 1 root root  4.0K Oct 12 11:05 .
drwxr-xr-x 1 root root  4.0K Oct 12 11:18 ..
drwxr-xr-x 2 1002 users 4.0K Oct 12 11:02 .ssh
drwxr-xr-x 3 root root    48 Oct  7 20:46 workspace

Note there was a 'workspace' directory there that is not present in the newly re-created admin account's home directory that I'm not sure about it's origin.

The same above behavior occurs if you try to do a live-image install over the existing disk (skip partitioning) and try to import the configuration from the previous installed image.

It was also suggested by @Apachez in Slack that this may be related to https://vyos.dev/T5455

Please let me know if anything else is needed. Thanks!

Details

Version
From 1.4-rolling-202308220020 to 1.5-rolling-202310080024, along with live-image (booted iso) install of the latter with imported config from previous image.
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)

Event Timeline

I had a similar issue going from 1.5-rolling-202309250022 to 1.5-rolling-202310090023.

I was also affected by this issue. I could only update to 1.5-rolling-202309280022. Updates to more recent versions had the effect that after login I coudn't manage VyOS as I only had a standard linux bash.

Therefore I opened a topic in the forum. It seems the issue only arises when the administrative user account is named admin. Another user mentioned that a user account named admin interferes with the pmacct package as this one already has a home directory included for user admin.

When I created a different administrative user account than admin I was able to successfully update to the latest 1.5 rolling version (1.5-rolling-202310120020).

zsdc claimed this task.
zsdc moved this task from Open to Finished on the VyOS 1.5 Circinus board.
zsdc moved this task from Open to Finished on the VyOS 1.4 Sagitta board.