Converting Existing Users to systemd-homed
21 days ago
- #Linux
- #user-management
- #systemd-homed
- Traditional Linux user management involves files like /etc/passwd, /etc/shadow, /etc/group, and /etc/gshadow.
- systemd-homed offers a new way to manage user accounts, requiring conversion from traditional methods.
- The conversion process is manual and risky, necessitating backups and careful preparation.
- Preparation includes ensuring systemd-homed is properly set up, having enough disk space, and backing up the home directory.
- Users must log out completely and log in as root to proceed with the conversion.
- Existing home directories should be renamed for safety before proceeding.
- User records from /etc/passwd and /etc/shadow should be reviewed and noted before deletion.
- systemd-homed always assigns a private group to each user, which may differ from traditional setups.
- After removing old user records, a new account is created with systemd-homed using homectl, preserving the old UID and GECOS information.
- The old home directory contents are migrated into the new systemd-homed managed directory using rsync.
- After successful migration, the old home directory can be removed, and users can log in normally under the new systemd-homed management.