Anders Johansson wrote:
On Thursday 29 January 2009 13:30:00 Basil Chupin wrote:
When I installed 11.1 the other day I mistyped the user name and ended up with having "fed" instead of "fred" as my user name and consequently the home directory is also named "fed".
I want to change it to "fred".
If I booted into the oS with init 1, issued the command
chown -R fred.users /home/fed
and then altered in Yast's User Management the user "fed" to "fred" (after logging in as root) and also renamed the current home directory to "fred" and rebooted the system, would this rectify the typing error I made - with no ill effects on the system?
(Oh yes- I would also clean out the /tmp directory.)
You have the order of operation wrong, but otherwise it will work.
The first thing you need to do is to change the name of the user. Then you can rename the home directory
You don't need to chown it though, changing the username will not alter the user ID, and it is the user ID that determines owner.
Actually, all you really need to do is
1. log out 2. log in as root 3. edit /etc/passwd and change the username and name of the directory 4. mv /home/fed /home/fred
and you're done. You don't have to go to runlevel 1 to do it
Anders
Sorry for not replying sooner but I was testing your suggested way of resolving my typing error. Many thanks to you and to Verner for the instruction on what had to be done to alter the logon name to the correct one and the list of files which had to be edited. Everything worked fine - except for 2 things: Thunderbird and FireFox, while they started OK, both "lost" the theme I had for each and reverted to the default themes; in addition all the extensions I had became inoperative even though they were still listed in the Addons. Took a little while to find the reason for this and resolve the issue. In addition to the files in /etc which you and Verner mentioned (group, passwd, shadow), in both ~/.mozilla and ~/.thunderbird one has to edit the extensions.ini and prefs.js files to reflect the user's change of name so that 'things' point to the correct directories in /home. Also, after making these changes for mozilla and thunderbird it was necessary (unusual I know) to reboot the sysem before the changes took effect; simply restarting Firefox and Thunderbird left both without extensions and with the default themes. (While FF and TB are now working as before I now wonder if there any other apps which may be similarly affected.) Ciao. -- "I do not instruct the uninterested; I do not help those who fail to try. If I mention one corner of a subject and the pupil does not deduce therefrom the other three, I drop him." Confucius -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org