Conversation

Jarkko Sakkinen

Edited 8 months ago

Changing user account name in #Linux-based operating systems is not hard, but can at least be inconvenient dance to do for various reasons. Just to give an example, sometimes root account needs to be enabled for password login temporarily so that home directory name can be changed without issues.

It would be super nice if this could be done similarly as with TPM chips and machine over keys (aka MOK managed with mokutil). I.e. there would be a way to set out a request for username change for logged in local account and upon next reboot there would be a query for new account name, and this process would be taken care of renaming username, group and home directory.

User name and group name are trivial because they don’t really change any identifiers associated with the user but AFAIK usermod completely denies home directory name change for a logged in account.

1
1
1

Jarkko Sakkinen

Edited 8 months ago
@securepaul I'm sorry missing today's meeting but maybe this could be something discuss in the next one? :-) Also @kees wouldn't this make somehow also sense from hardening perspective to have a way to do more rigid physical presence involved dance when changing account name in some situations? Not sure, just thought that this would be interesting idea...
1
0
0

@jarkko that kinda sounds like a systemd RFE to me ... ?

1
0
1
@securepaul OK cool. Tbh no idea what that is but I'll check, thanks!
1
0
0

@jarkko my apologies, I wasn't very clear. What I meant was that the functionality you are proposing seems like it would fit best within systemd, or as a systemd unit file.

1
0
0
@securepaul This whole thing came to mind because I just reinstalled one of my systems realizing that i had typo in the login name. I fixed that by full re-install because it is less trouble to do that than dance the usermod dance :-)
0
0
1