Process ID Allocation in Linux.

In `/proc/sys/kernel/pid_max`. Max PID value will define. Example PID 17 issued just now, then PID 18 will be next. By the time of issuing PID 18 even though PID 17 wasnt alive still kernel will issue PID 18 and this will create a unique PID issue behaviour and till what value process IDs can be issues will be define at /proc/sys/kernel/pid_max

so till that value process IDs will be issues and then it will start from the beginning.

“`bash
[root@967dd7743677 /]# cat /proc/sys/kernel/pid_max
99999
[root@967dd7743677 /]#
“`

chage : Linux Command

chage is a Linux command. chage is used to change user password expiry information.

1. To set every user must reset his password on his first login use command as

sudo chage -d0

2. To see when a user reset his password and when his password expires etc we can use below command

sudo chage -l

3.To set or modify last password reset date of a user this command

sudo chage -d 2010-09-10 testing

Screenshot - 10092015 - 12:29:21 AM

4.To set password expiry for a user , use this command

sudo chage -E 2015-10-10 testing

Screenshot - 10092015 - 12:32:05 AM

For more information , Please visit manpage :chage

How to set password with vim

Setting password with vim editor is pretty simple .Open your terminal and type as

vim +X filename.txt

After it got opened it will ask for password, Enter same password two times and thats it. your file got protected by password. next you want to open it then you must now the password

…..

Record Terminal session as text

I have gone through some wonderful command today named as script. You know what it do , it will simply record all your terminal sessions as text.

Usage : script <filename>

Example:

Screenshot - Monday 04 May 2015 - 06:22:01  IST

In the example you can see, after I typed as script terminal01 , its started storing all the text I am typing after it and its stopped doing that after I have typed exit.

I have seen the same what I have typed in the terminal with more terminal01 command. you can see it in the image.

Hope that helps.