Skip to main content
added 4 characters in body
Source Link
ilkkachu
  • 148k
  • 16
  • 268
  • 441

I have created a user called paul using the following command:

sudo adduser paul 

adduser also created a new group called paul and made it the primary group for the user paul.

I have created a file using the paul user, and displayed its information using ls-l:

-rw-r--r-- 1 paul paul 25 2017-05-14 15:30 1.txt

-rw-r--r-- 1 paul paul 25 2017-05-14 15:30 1.txt 

Then I have deleted the paul user using the following command:

sudo userdel paul 

And then I have displayed the previously created file's information using ls -l:

-rw-r--r-- 1 1001 1001 25 2017-05-14 15:30 1.txt

-rw-r--r-- 1 1001 1001 25 2017-05-14 15:30 1.txt 

The paul user has been replaced by its ID (which is 1001) since I have just deleted this user. But why the group ID is also displayed instead of the group name, was the group also deleted?

I have created a user called paul using the following command:

sudo adduser paul 

adduser also created a new group called paul and made it the primary group for the user paul.

I have created a file using the paul user, and displayed its information using ls-l:

-rw-r--r-- 1 paul paul 25 2017-05-14 15:30 1.txt

Then I have deleted the paul user using the following command:

sudo userdel paul 

And then I have displayed the previously created file's information using ls -l:

-rw-r--r-- 1 1001 1001 25 2017-05-14 15:30 1.txt

The paul user has been replaced by its ID (which is 1001) since I have just deleted this user. But why the group ID is also displayed instead of the group name, was the group also deleted?

I have created a user called paul using the following command:

sudo adduser paul 

adduser also created a new group called paul and made it the primary group for the user paul.

I have created a file using the paul user, and displayed its information using ls-l:

-rw-r--r-- 1 paul paul 25 2017-05-14 15:30 1.txt 

Then I have deleted the paul user using the following command:

sudo userdel paul 

And then I have displayed the previously created file's information using ls -l:

-rw-r--r-- 1 1001 1001 25 2017-05-14 15:30 1.txt 

The paul user has been replaced by its ID (which is 1001) since I have just deleted this user. But why the group ID is also displayed instead of the group name, was the group also deleted?

edited tags
Link
Jeff Schaller
  • 68.8k
  • 35
  • 122
  • 266
Source Link
user7681202
  • 1.4k
  • 4
  • 14
  • 29

Will the primary group of a user be deleted when you delete the user?

I have created a user called paul using the following command:

sudo adduser paul 

adduser also created a new group called paul and made it the primary group for the user paul.

I have created a file using the paul user, and displayed its information using ls-l:

-rw-r--r-- 1 paul paul 25 2017-05-14 15:30 1.txt

Then I have deleted the paul user using the following command:

sudo userdel paul 

And then I have displayed the previously created file's information using ls -l:

-rw-r--r-- 1 1001 1001 25 2017-05-14 15:30 1.txt

The paul user has been replaced by its ID (which is 1001) since I have just deleted this user. But why the group ID is also displayed instead of the group name, was the group also deleted?