Small finds…

what you will find here ? 

In this page i ll write my small finds so that i can remember it later and even other can make use of it.

User Management of Linux / Custom numbered UID and GID

In Linux we have a file located in /etc/passwd which contains UID,GID and encrypted password of the user and many other information.  A user in Linux is identified by its UID which is located in same file. By default we have some predefined UID’s. For Ex:

UID of root User will always be 0

UID of any system user will be more  than 1000 or 1000

Syntax found in /etc/passwd :

USERNAME:PASSWORD:UID:GID:FULL_NAME:HOME DIRECTORY:SHELL

HOW TO SEE IT ?? : id -u <user_name> 

We can change this number according to our requirement, this needs to be written in  /etc/login.defs the values in it can be changed and we custom numbers UID’s for users in the block (MIN/MAX VALUES FOR AUTOMATIC UID SELCETION FOR USERS)

 

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s