S
S
sergey2016-10-10 12:56:41
linux
sergey, 2016-10-10 12:56:41

Folder name change due to change username how to do?

I had a chance to change the user from xxxxxx to yyyyyy , not add, but change, as well as the username in the terminal (using the usermod command). All OK. But I ran into a problem, the user's working folder, the one in the / home directory, remained under the name of the previous user xxxxxx , and the files that are in it are now unavailable for editing (mostly documents). How to do it right, rename this folder?
HER path /home/xxxxxx-user/...

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
romy4, 2016-10-10
@zorro76

Just rename /home/xxxxxx-user/ to /home/yyyyyy-user/ and change the permissions
but only the -m flag on usermod. although you did not read the help, apparently

A
abcd0x00, 2016-10-13
@abcd0x00

To rename the home directory, you can simply rename it, and then change the owner and owner group using the recursive chown.
chown -R новое_имя:новая_группа новый_каталог

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question