Apologies for listing the component as 'basesystem', but I could find no entry for 'usermod', and I am not sure which component it is a part of, if not its own. As I don't know what component this is a part of, I can't give a component version. However, this is a fresh install of FC6. On a fresh install of FC6: usermod -d /home/subdir/[accountname] -m [username] seems to execute without error, but neither creates the directory /home/subdir/[accountname], nor moves any of the files from the original location of /home/[accountname]. It does change the account's settings to point to /home/subdir/[accountname] as the location of the account's home directory. So, it seems like the -d switch is working, and it is the -m switch that is not performing properly. FYI, the /home/subdir directory already exists, and I've tried creating the directory /home/subdir/ [accountname], and then executing usermod as above, all with the same results. I posted this to fedora users newsgroup. Others felt this is a bug, as well.
I can't reproduce it. original state # ll drwx------ 3 foo1 foo1 4096 Nov 2 14:22 foo1 # grep foo /etc/passwd foo1:x:502:502::/home/foo1:/bin/bash try "-d" option # usermod -d /home/foo2 foo1 # ll drwx------ 3 foo1 foo1 4096 Nov 2 14:22 foo1 # grep foo /etc/passwd foo1:x:502:502::/home/foo2:/bin/bash ---------> OK revert change # usermod -d /home/foo1 foo1 # grep foo /etc/passwd foo1:x:502:502::/home/foo1:/bin/bash ---------> OK finally use together with "-m" option # usermod -d /home/foo2 -m foo1 # ll drwx------ 3 foo1 foo1 4096 Nov 2 14:22 foo2 # grep foo /etc/passwd foo1:x:502:502::/home/foo2:/bin/bash ---------> OK
I have updated shadow-utils based on last night's update (11/1/06) to shadow-utils.i386 4.0.17-8.fc6 and usermod now works properly, as you describe. However, in either the version that ships with FC6, shadow-utils - 2:4.0.17-5.i386, or an interim version (2:4.0.17-6 or 2:4.0.17-7, if they exist) the -m switch DID NOT WORK. I have to believe that you tested after last night's update. Please feel free to reclose this; I just want to document for others.
I don't know how it is possible. There isn't any change in 4.0.17-8.fc6, which might affect this issue.