I need to update a ftp user's home directory. Could I run the userdel command then re-add the user without losing the directory the user was attached to? Or is there another way to change the user's directory?

I'm not using a chroot_list either...

Thanks.

link|improve this question
feedback

1 Answer

up vote 3 down vote accepted

You want to use the usermod command. You are going to want to use the -m and -d directives to modify their home directory.

-d, --home HOME_DIR The users new login directory.

       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.

  -m, --move-home
       Move the content of the users home directory to the new location.

       This option is only valid in combination with the -d (or --home)
       option.
link|improve this answer
Thanks, that worked perfectly! – Spencer Aug 15 '11 at 19:15
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.