Changing main username/home/groups
Colin Law
clanlaw at googlemail.com
Thu Sep 9 06:57:56 UTC 2010
On 8 September 2010 00:58, NoOp <glgxg at sbcglobal.net> wrote:
> I have a lucid test partion on my laptop that I was using to test sound
> patches. Today I decided to do a network upgrade to maverick so that I
> can test the patches with that version.
>
> The machine name was 'lucidtest-laptop' and username/group was
> 'lucidtest'. To make things easier I decided to change to
> 'mavericktest-laptop' and 'mavericktest' respectively. So I go hunting
> around to find an easy way to change the names and group and end up
> booting to Recovery mode & use root to:
>
> # usermod -l mavericktest -m -d /home/mavericktest lucidtest
> # groupmod -n lucidtest mavericktest
> # nano /etc/hosts
> (modify the host to reflect 'mavericktest-laptop')
> # nano /etc/hostname
> (ditto)
>
> So far so good. However when I logout & log back in GDM is still showing
> 'lucidtest' in the user box, but also shows 'mavericktest' in the black
> floating username box. I login & find that my home folder is
> appropriately renamed to 'mavericktest' and ownership (owner and group)
> is proper. However, the owner is showing 'mavericktest-lucidtest'. I
> also verify that my terminal prompt shows:
>
> $ mavericktest at mavericktest-laptop
>
> and then check System|Administration|Users and Groups and find that the
> user is showing lucidtest & mavericktest (the latter in faint grey below
> lucidtest). Now, I can't change that while logged in, so I try from
> Recovery|Root and still can't manage to get it right. I finally end up
> enabling Root, login to that and changing the username in
> 'System|Administration|Users and Groups', logout of Root, log in to
> mavericktest (it's showing correctly at the GDM login screen now), and
> kill the Root account. It's now installing the maverick dist upgrade.
>
> So here is my question; how should/could I have done all of this
> easily/properly & particularly what did I miss for the GDM login name issue?
I don't know why you have had the problems you describe, but I have
changed my username and home folder (in Karmic) using usermod as you
have described without seeing the phantom residual presence of the
original user name. Rather than do it as root I achieved it by
creating a new temporary user first then used it (using sudo usermod)
to rename the original user. I have not installed Maverick anywhere
yet so cannot confirm whether this is a Maverick issue.
Colin
More information about the ubuntu-users
mailing list