Making sense of the userspace

Background:
group name: ABC
My name : Tim

Recently while trying to use chown, I tried every combination but failed until I did
chown -R abc:abc

The syntax that was supposed to work was chown -R tim:abc
So I entered a few commands to make a sense of the users here
Following are the outputs

IN:

abc@abc-Inspiron-3551:~$ who

OUT:

abc :0 2022-02-09 08:14 (:0)

IN:

abc@abc-Inspiron-3551:~$ getent group abc

OUT:

abc:x:1000:

IN:

abc@abc-Inspiron-3551:~$ groups

OUT:

abc adm cdrom sudo dip plugdev lpadmin sambashare

IN:

abc@abc-Inspiron-3551:~$ groups tim

OUT:

groups: ‘tim’: no such user

Now, I know that tim is a user ( or atleast name of the user ??) because my login screen says tim and users section of the settings application also says tim.

So what I don't understand is that if tim is a part of the group or not ??
And if not how am I seeing my name on the login screen ?

From what you posted, it looks like abc is your admin user account.
It showed this when you ran groups and if you run groups abc, the output should be: abc adm cdrom sudo dip plugdev lpadmin sambashare

You may have created a secondary user account named "Tim", but not added it to any groups.
You can add a user to a troup with

sudo useradd -G GROUP-NAME USER-NAME

replacing GROUP-NAME and USER-NAME accordingly.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.