You are not logged in.

#1 2010-02-04 18:07:01

jlacroix
Member
Registered: 2009-08-16
Posts: 576

(SOLVED) Changing Home Directory to Match New User Name?

Hello everyone. I changed my login name from "jeremy" to "jlacroix". Long story. I did that using the "usermod" command. That worked fine and I able to log in under the correct username so that part is working great.

My home directory is still /home/jeremy though.

How do I change that to /home/jlacroix? Would that break the permissions on all of my files? Basically I'm hoping that I can change my home directory from /home/jeremy to /home/jlacroix and have all the permissions updated at the same time. I'm not sure if this is possible so please let me know.

You guys rock!

Last edited by jlacroix (2010-02-05 03:01:09)

Offline

#2 2010-02-04 18:31:45

SemiBz
Member
From: Riga, Latvia
Registered: 2010-01-30
Posts: 80

Re: (SOLVED) Changing Home Directory to Match New User Name?

Change the users home directory:

usermod -d /home/jlacroix jlacroix

.. or acquire the privileges to the existing one:

chown -R jlacroix:jlacroix /home/<old_user>

Last edited by SemiBz (2010-02-04 18:34:35)

Offline

#3 2010-02-04 18:53:20

jlacroix
Member
Registered: 2009-08-16
Posts: 576

Re: (SOLVED) Changing Home Directory to Match New User Name?

SemiBz wrote:

Change the users home directory:

usermod -d /home/jlacroix jlacroix

.. or acquire the privileges to the existing one:

chown -R jlacroix:jlacroix /home/<old_user>

Thank you. From looking at what you posted, the first command would do what I want, right?

Offline

#4 2010-02-04 19:41:03

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: (SOLVED) Changing Home Directory to Match New User Name?

If you want to keep the current dir, just renamed, then you can combine usermod with chown and mv


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#5 2010-02-04 19:42:30

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: (SOLVED) Changing Home Directory to Match New User Name?

I'd "mv /home/jeremy /home/jlacroix", then "chown -R jlacroix.users /home/jlacroix" and then the usermod -d thing.

Offline

#6 2010-02-05 03:00:54

jlacroix
Member
Registered: 2009-08-16
Posts: 576

Re: (SOLVED) Changing Home Directory to Match New User Name?

Thanks everyone! Complete success. smile

Offline

Board footer

Powered by FluxBB