Bug 450590 - Unable to rename user, if it is due to existing home folder, no error is shown stating this
Summary: Unable to rename user, if it is due to existing home folder, no error is show...
Status: CONFIRMED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_users (show other bugs)
Version: 5.24.1
Platform: Neon Linux
: NOR minor
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords: usability
Depends on:
Blocks:
 
Reported: 2022-02-19 22:15 UTC by Tom Atkinson
Modified: 2022-02-21 23:04 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
error saving changes (35.15 KB, image/jpeg)
2022-02-19 22:20 UTC, Tom Atkinson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Atkinson 2022-02-19 22:15:33 UTC
Normally my username is `tom`.
A fresh install is done as user `neon`.
Now I wish to rename neon back to tom, and change ~ folder from /home/neon to /home/tom

Minor GUI issue in `Manage Users` in system settings: "There was an error saving changes".  It is unable to perform user login name change. User is still "neon".

Perhaps I will fix with the usermod CLI command, but not sure where to start. You can see my attempts to fix this here:

cat /etc/passwd | grep 1000
neon:x:1000:1000:Tom Atkinson:/home/neon:/bin/bash
ls -la /home
drwxr-xr-x  1 neon neon  5692 Feb 20 10:19 neon
drwxr-xr-x  1 neon neon  5660 Feb 20 05:41 tom

usermod -d /home/tom neon
usermod: user neon is currently used by process 1909
sudo usermod -d /home/tom neon
usermod: user neon is currently used by process 1909
usermod --login tom neon
usermod: user neon is currently used by process 1909

Maybe I will try this as root prior to graphical login so I will file this report for now: I made this report in case noobs be vexed by it (after entering admin creds it would be nice if panel could detect the permissions issues and ask to fix it automagically).

- I installed KDE with user 1000 as "neon" with home inside root /
- then i decide i want to mount a home partition at /home and access /home/tom my normal user account. i install with username neon to protect that folder somewhat when installing fresh copy of linux.
- cd /home mv neon neon_factory #before i delete i backup factory settings in case
- cp -al tom/ neon/ #bringing my old home folder across 



OBSERVED RESULT


EXPECTED RESULT


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Tom Atkinson 2022-02-19 22:20:24 UTC
Created attachment 146951 [details]
error saving changes
Comment 2 Nate Graham 2022-02-21 23:04:03 UTC
You can't change the name of your currently-logged-in user; all hell will break loose. You should create a new admin account and make the change from there.

We should communicate this in the UI.