You are not logged in.
Pages: 1
I would like to change my login info/name using usermod. I want to make sure not only my name is changed but my home folder and all its contents is also changed to reflect the new name. How do I do this safely?
I'm using a laptop with a 20gb drive which is basically full, my home folder is taking up 7gb in size and I have only 2gb free space.
I think I'm correct in thinking that
usermod -l newname oldname
will change the login info but I'm not sure how to have my home folder reflect the change.
I think using
usermod --home -m newname
may be correct but I worry that during the copy I will run out of space. Can I avoid copying and just change the contents?
My home folder has lots of nice things that I don't what to lose. I didn't want to take a risk so posted here for advice.
Offline
That should do it.
I recommend you to create a dummy user. Copy some files to its homedir and then test on dummy user.
Backup is never a bad thing. Also I dont know what happens if you are loged in as a user whos home dir and login name you are going to change.
Last edited by Purch (2008-06-04 06:36:39)
Offline
Cheers for the fast reply, do you not think that the lack of space will be a problem?
I will make a dummy user to test the process on but I still worry that during the copy process I may get an error for no space left to copy, I'm just not sure how it works.
I have 5gb left in root I think I'll copy the important stuff into root as a back up and give it a try.
Thanks for the input.
Offline
From the man page of usermod:
If the -m option is given the contents of the current home directory will be moved to the new home directory, which is created if it does not already exist.
You won't run out of room by doing a move
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
I see yes move not copy:D don't know where I got copy from. I just tried it but lost my home folder making another typo things went crazy got it back again and was able to log back in to make this post. I'm way to tired to be messing about with this now.
I'm gonna sleep I'll post back tomorrow and let you know how things are going.
Offline
Pages: 1