Skip to main content

The Password Aging Policy (Linux) Part I

Hey folks,

In this (Part I) practical based article we'll go through the password (aging) policy in Linux. So, let's get started and know that what is the password aging policy?

In order to ensure system and network security, various security mechanisms are used, which includes user password expiration, determining the time interval d1uring which the password will be in use, forcing users to change their password, sending a warning message to users to change the password before the password expires, and deactivating the user account and so on. Now let's talk about some settings in the password policy. In general, processes related to password policies and measures in Linux are done through the "chage" command and  "/etc/login.defs." file.

There are some following settings in the password aging policy:

  • The last password change date - is the date when the last password has been changed by the user;
  • The password expiration date - is the last date the password remains valid, after the last date the password is no longer valid;
  • The password inactive date - is the deadline for using an expired password, after the deadline the user account will be locked if the expired password is not changed;
  • An account expiration date -  is the deadline for the user will be able to use an account, after the deadline the account will be automatically locked;
  • The minimum number of days between password change - is the number of days before the user is allowed to rechange the password and the days are calculated from the last password change date;
  • The maximum number of days between password change - is the number of days till the password becomes valid and the days are also calculated from the last password change date;
  • A number of days of warning before the password expires - is the number of days in which the user will be getting a warning message to change the password before the password expiration date and since the expiration date of the password, the days are calculated in a reverse mode.

To list the password aging settings for the specific user "chage -l" command is used and the following result displays that the password policy settings have been modified for the username (arazahmadov):

$ sudo chage -l arazahmadov
Last password change                                    : Aug 15, 2022
Password expires                                        : Sep 14, 2022  
Password inactive                                       : never
Account expires                                         : never
Minimum number of days between password change          : 10
Maximum number of days between password change          : 90
Number of days of warning before password expires       : 14

The default value of the password aging policy is stored in "/etc/login.defs." file.

# Password aging controls:
#
#       PASS_MAX_DAYS   Maximum number of days a password may be used.
#       PASS_MIN_DAYS   Minimum number of days allowed between password changes.
#       PASS_MIN_LEN    Minimum acceptable password length.
#       PASS_WARN_AGE   Number of days warning given before a password expires.
#


PASS_MAX_DAYS   60
PASS_MIN_DAYS   1
PASS_MIN_LEN    5
PASS_WARN_AGE   5

The mentioned (/etc/login.defs.) fil applies it's default settings for the new created users in Linux system. For instance:

$ sudo chage -l TestUser
Last password change                                    : Aug 21, 2022
Password expires                                        : Oct 20, 2022
Password inactive                                       : never
Account expires                                         : never
Minimum number of days between password change          : 1
Maximum number of days between password change          : 60
Number of days of warning before password expires       : 5

Dear folks,

I guess and hope this (Part I) article I wrote about the password aging policies, will be helpful for your enlightenment.

Thank you

Sincerely,

Author,

Araz Ahmadov

Comments

Popular posts from this blog

Fayl Bərpa Alqoritmləri

  Salam dostlar, Bu yazımda sizə fayl bərpa proqramlarının (Recuva, Wondershare, EaseUS Data Recovery və s.) faylları bərpa etməsi haqqında bəhs etmək istərdim ki, məhz bu proqramlar silinmiş məlumatların (şəkil, video, sənəd və s.) geri qaytarılması üçün xüsusi alqoritmlərdən istifadə edir. Bu prosesin texniki tərəflərini izah etmək üçün əvvəlcə bir neçə əsas anlayışı bilmək lazımdır: Silinmiş faylların vəziyyəti Əksər fayl sistemlərində (məsələn, NTFS, FAT32, exFAT) fayl silindikdə, həmin fayl fiziki olaraq diskin üzərindən silinmir ki, bu zaman: Fayl sistemində faylın olduğu yer boş olaraq işarələnir və həmin sahə üzərində yeni məlumat yazıla bilməsi üçün icazə verilir; Faylın "metadata"-ları (fayl adı, ölçüsü, yaradılma tarixi və s.) xüsusi strukturlarda saxlanılır (məsələn, NTFS-də MFT / Master File Table). Bu səbəbdən, fayl silindikdən dərhal sonra onu bərpa etmək mümkündür, çünki həmin məlumat fiziki olaraq diskin üzərində qalır. Ancaq yeni məlumat həmin yerə yazıldıqd...

How To Install WordPress On Rocky Linux 9

WordPress is widely recognized as the preferred platform for building websites and blogs due to its ease of use and wide range of customization features. Suppose you’re considering installing WordPress on Rocky Linux, an open-source operating system known for its reliability. In that case, you’ll find the process to be quite straightforward when coupled with the LAMP stack – Linux, Apache, MySQL, and PHP. In the following article, we will guide you through each step of setting up WordPress on Rocky Linux using LAMP, allowing you to get your website or blog up and running smoothly in no time. So, let’s dive into the process! Install WordPress On Rocky Linux 9 Step 1: Update Your System in Rocky Linux Step 2: Installation process of LAMP Step 3: Install WordPress in Rocky Linux 9 Step 4: Configuration of Database Step 5: Configuration of WordPress Step 6: Configuration of Firewall settings Step 7: Log in to WordPress Step 1: Update Your System in Rocky Linux Before installing any new sof...

Fayl şifrələmə vasitələri (Linux)

Salam dostlar, Bu məqaləmdə "linux"-da istifadə olunan bəzi fayl şifrələmə vasitələri (file encryption tools) haqqında bəhs edəcəm. Beləliklə, fayl şifrələməsi nədir və "linux"-da hansı fayl şifrələmə vasitələri mövcuddur? Fayl şifrələməsi mübadilə edilən məlumatların oxunmaz vəziyyətə çevrilməsi prosesidir ki, faylların şifrələnməsi təhlükəsizlik baxımından çox vacibdir. Beləliklə, "linux"-da faylların şifrələməsini həyata keçirən bəzi vasitələr (tools) mövcuddur: "GnuPG (GPG)" "GnuPG" şifrələmə və rəqəmsal imza məqsədləri üçün geniş istifadə olunan pulsuz və açıq mənbəli proqramdır ki, faylları və e-poçtları şifrələmək, eləcə də deşifrə etmək üçün "OpenPGP" standartından istifadə edir. Bu şifrələmə platformasınds əvvəlcə "public key" və "private key" yaradılmalıdır ki, bu zaman "public key" şifrələmə (encrypt), "private key" isə şifrənin açılması (decrypt) üçü...