GNU/Linux >> Belajar Linux >  >> Cent OS

Cara Menerapkan Kompleksitas Kata Sandi Untuk Semua Pengguna, Termasuk “root”, Dengan Menggunakan Modul PAM “passwdqc” CentOS/RHEL

Posting ini menguraikan langkah-langkah untuk mengonfigurasi kompleksitas kata sandi untuk semua pengguna, termasuk root. “pam_cracklib.so ” Modul PAM tidak memeriksa kerumitan kata sandi untuk pengguna “root” secara default. Jadi untuk mengatasinya “pam_passwdqc.so ” modul dapat digunakan untuk menerapkan batasan untuk semua pengguna, termasuk “root”.

1. “pam_passwdqc.so” disediakan oleh paket “pam_passwdqc”.

# rpm -qf /lib64/security/pam_passwdqc.so
pam_passwdqc-1.0.5-8.el6.x86_64

2. Komentari baris modul “pam_cracklib.so” di file /etc/pam.d/system-auth dan tambahkan “pam_passwdqc.so”. Ingat, urutan baris penting!

# password requisite pam_cracklib.so try_first_pass retry=3 type=    ### Comment out this line
password requisite pam_passwdqc.so enforce=everyone    ### Apply password restriction to all users

3. Uji reset kata sandi untuk pengguna root.

# passwd
Changing password for user root.

You can now choose the new password or passphrase.

A valid password should be a mix of upper and lower case letters, digits, and other characters. You can use an 8 character long
password with characters from at least 3 of these 4 classes, or a 7 character long password containing characters from all the
classes. An upper case letter that begins the password and a digit that ends it do not count towards the number of character
classes used, unless disable_firstupper_lastdigit_check option is enabled.

A passphrase should be of at least 3 words, 11 to 40 characters long, and contain enough different characters.

Alternatively, if noone else can see your terminal now, you can pick this as your password: "ambush!nail_buy".

Enter new password:

4. Lihat halaman manual “PAM_PASSWDQC” untuk detail lebih lanjut dan untuk menyesuaikan kompleksitas kata sandi.

# man PAM_PASSWDQC
Catatan :– modul pam_cracklib.so &pam_passwdqc.so menyediakan fungsionalitas pemeriksaan kata sandi yang serupa sehingga keduanya tidak boleh digunakan secara bersamaan.


Cent OS
  1. Setel ulang kata sandi root di CentOS 7 / RHEL 7

  2. Cara mereset kata sandi root yang terlupakan RHEL / CentOS 7

  3. Cara menginstal modul mod_pagespeed untuk Apache di RHEL, CentOS dan Fedora menggunakan YUM

  1. CentOS / RHEL 7 :Cara membuka port Firewall untuk server Samba menggunakan FirewallD

  2. CentOS / RHEL 7 :Cara mengganti nama grup volume untuk root dan swap

  3. CentOS / RHE 7:Cara Mencegah Pengguna Menggunakan 10 Kata Sandi Terakhir

  1. CentOS / RHEL 7 :Cara mengaktifkan telnet untuk sekelompok pengguna

  2. CentOS / RHEL 7 :Cara menghapus gambar penyelamatan menggunakan kotor

  3. "passwd:Modul tidak diketahui" – kesalahan saat mengubah kata sandi di CentOS/RHEL 6