10-02-2016, 10:02 PM
(This post was last modified: 10-05-2016, 01:42 PM by gold_finger.)
Sorry, I didn't forget about you -- have just been tied-up with other things for past few days.
"sam-the-editor" is showing in both groups 1001 and 1002, but group 1001 is called "sam".
Suggest we start fresh, so before we continue, if there is any data saved to home of "sam-the-editor" in Lubuntu, save it off to a USB stick first. (You can copy it back later.)
Boot into Lubuntu as "happyfamily" (not sam-the-editor). Open a terminal and enter this command to delete "sam-the-editor" account including respective home files.
Code:
sudo userdel --remove sam-the-editor
Run this command again to see who shows up as users on computer (with ID# > 1000):
Code:
awk -F: '($3 >= 1000) {printf "%s:%s:%s\n",$1,$3,$4}' /etc/passwd
Hopefully you only see:
Code:
nobody:65534:65534
happyfamily:1000:1000
Assuming that went okay, run this command again to see what groups (with ID# > 1000) are still on computer:
Code:
awk -F: '($3 >= 1000) {printf "%s:%s\n",$1,$3}' /etc/group
I'm guessing it will show:
Code:
nogroup:65534
happyfamily:1000
sam:1001
If that's correct, we'll get rid of "sam" group with this command:
Code:
sudo groupdel sam
Now create "sam-the-editor" account again and it should end up with UID and GID both being 1001. Here's the command:
Code:
sudo useradd -m -G adm,cdrom,dip,plugdev,users,lpadmin,sambashare -s /bin/bash sam-the-editor
Make a password for "sam-the-editor" account:
Code:
sudo passwd sam-the-editor
Use two "awk -F" commands from before to check what users and groups show up. This time "sam-the-editor" should show as UID and GID 1001 and there should be no more "sam" GID.
Logout (or Reboot) and login with "sam-the-editor", then copy back anything saved before into appropriate home folders.
Try Linux Beginner Search Engine for answers to Linux questions.