The problem is that brian is not really brian. Sound confusing? When you create users and groups in Linux, they are kept in 2 tables - /etc/passwd and /etc/group and each text name is assigned a unique number - the uid and gid. Those numbers are what are used in all directory and file entries and not the actual name. So, brian on your old system may have been assigned uid 1000 and brian2 was assigned uid 1000 on your new system. That means that brian2 probably appears to own all the files under /home/brian.
What you'll need to do is create user brian on the new system and then change the ownership of everything from /home/brian on down to that new user with the following command:
Code:
sudo chown -R brian:brian /home/brian
When adding the new user, you'll probably see warnings similar to these:
Code:
Adding user `another' ...
Adding new group `another' (1001) ...
Adding new user `another' (1001) with group `another' ...
The home directory `/home/another' already exists. Not copying from `/etc/skel'.
adduser: Warning: The home directory `/home/another' does not belong to the user you are currently creating.
Note: If you want a user added after the system was installed to work just like the "admin" user, you will probably have to give that user the ability to use sudo by adding it to the sudo group with the following command. Obviously you'll have to sign in as brian2 to do this.
Code:
sudo usermod -aG sudo brian
Bookmarks