User Management (2) - RHCSA

How uid is being assigned?

When we creating a user system will automatically assign uid for the user. In previous notes I have mentioned about the uid ranges. So Regular User category is starting from 1000.  Usually uid is starting from 1000 but we can change it. For doing that use following steps.
After that vim text editor will open. Scroll down when UID_MIN found. then press i to insert.
Change it. For an example, if you change it to 4000. UID will starting from 4000.
Then pren ESC and type :WQ to save and quit.

For an example ,
  • First UID is 1000
  • After adding user UID will be 1001
  • If we add another one UID will be 1002
  • Then we change UID_MIN to 4000
  • If we add a user now UID will be 4000
  • Another user add , then UID will be 4001

 Delete a User

Using following command we can delete the given user. For that user must be already existed.
<user name> should be replaced.

But users' details file is kept in the system when we use above command. It is not deleted. If it was an accidental deletion,So we can recover it.
If you want to delete a user with his/her mail spool and home directory you should use following command.
After that entire user profile will be deleted.

Comments

Popular posts from this blog

Add Cisco Layer 2 Switch in GNS3 - GNS3 වලට Cisco Layer2 Switch එකක් ADD කිරීම

User Management (3) - RHCSA

Interrupt the kernel to change the fstab - RHCSA