> >Make sure the user
> >to be renamed is not logged in. Use mv /home/olduser /home/newuser.
> 
> Didn't work for me. The cp -a approach that I suggested worked fine,

cp -a copies all symlinks as-is, and there's not much point duplicating data
and then deleting it (what if /home is over half full?). If cp worked for
you but mv didn't then the reason is unrelated. My guess is you didn't sort
out the (numeric!) user and group IDs. You have ownership and permission
issues to deal with for that kind of job, and you need to deal with numeric
and alphanumeric user IDs separately.

If you just wanted to change the name associated with a numeric ID, the
fastest and esiest way is to just edit /etc/passwd & Co - change the name
but leave the numbers.

Hm, were the old and new user directory locations on different partitions?
In that case, yes you do need cp -a instead of mv. mv will attempt to copy
if source and dest are not on the same filesystem but I don't know whether
it'll do a good job of it equivalent to cp -a.

> Using cp -a also means that you can copy your own home space while 
> you're logged in, which is convenient.

While you're logged in??? Don't do it. It has never been a good idea to saw
off the branch one is sitting on unless one has previously carefully
established a safety net or otherwise ensured one will be landing on the
feet. As you need to do some of the changes as root anyway you might as well
fix up the rest as root too. If you changed numeric IDs an appropriate chown
-Rh will fix it without copying the lot. And you never have the old user
logged in. Create a new user and log in as that one before becoming root if
you need to do things with the GUI.

Volker

-- 
Volker Kuhlmann                 is list0570 with the domain in header
http://volker.dnsalias.net/     Please do not CC list postings to me.

Reply via email to