[ubuntu-uk] Password recovery

Neil Greenwood neil.greenwood.lug at gmail.com
Tue Jul 8 08:25:20 BST 2008

2008/7/7 Philip Stubbs <philip at stuphi.co.uk>:
> 2008/7/7 Lucy <lucybridges at gmail.com>:
>> So, in a terminal type:
>> sudo mv /home/user2 /home/user2-tmp
>> Then go to "System->Administration->Users and Groups" to add user2.
>> Then do:
>> sudo cp -a /home/user2-tmp/ /home/user2

To answer Lucy's question, this *will* also copy the dot-files (.*)

> What I would do is
> sudo rm -r /home/user2
> sudo mv /home/user2-tmp /home/user2
> sudo chown -R user2:user2 /home/user2
> replace user2:user2 with the user and group details for user2

I agree with Philip; this will get all of user2's files back as they
were before the re-install.

The only small modification I would make is changing the last command to

sudo chown -R user2: /home/user2

This will use user2's primary group, just in case the group 'user2'
wasn't created...but we're now getting quite deep into the details of
users and groups on *nix, which might have left Keith behind :-(

I hope this helps you out Keith. If you have been left behind, or want
more details about any of the commands, let us know.


More information about the ubuntu-uk mailing list