Making sense of the userspace

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


abc@abc-Inspiron-3551:~$ who


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


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




abc@abc-Inspiron-3551:~$ groups


abc adm cdrom sudo dip plugdev lpadmin sambashare


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


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.