Mailinglist Archive: opensuse (3618 mails)

< Previous Next >
Re: [opensuse] User name typo error when installing oS - how to rectify
  • From: Anders Johansson <ajohansson@xxxxxxx>
  • Date: Thu, 29 Jan 2009 13:41:33 +0100
  • Message-id: <200901291341.33243.ajohansson@xxxxxxx>
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


To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >