usermod change username problem
Dear Debian community:
I have got a specific problem using usermod to change my previous
username olduser to newuser.
This is what I use:
sudo usermod -l newuser -md /home/newuser olduser[:w
newuser is the new login name and -md use /home/newuser as the new
home directory and moves /home/olduser to /home/newuser.
The problem is after I did all this I found that in /home/newuser
the file ownership becomes newuser:olduser. So the group
ownership is still olduser. I know I can use chgrp to change
group owner olduser to newuser. But I guess there are simpler ways to do
that.
So basically I don't want to use olduser as my username again and want
to change 'everything' associated with olduser to become newuser. such
the home directory, spoolfile, cron, etc... and I dont want the olduser
appear again.
Thanks for any suggestions.
--
Zhengquan
Reply to: