Home >> Linux Command A-E, User Management

chage

Fungsi Perintah

Mengubah dan menampilkan masa berlaku password.

Struktur Perintah

chage [option] username

Daftar Option

-E Menentukan masa berlaku password dengan format YYYY-MM-DD
-M Menentukan jumlah maksimum hari password saat ini harus diganti
-m Menentukan jumlah minimum hari sebelum password dapat diganti
-l Menampilkan masa berlaku password
-I Menentukan berapa hari setelah password expired system akan me-lock user tersebut.
-W Menentukan berapa hari sebelum password expired peringatan akan diberikan.

Contoh Penggunaan

Melihat masa berlaku password dari user stogom.

$chage -l stogom
Minimum:        0
Maximum:        99999
Warning:        7
Inactive:       -1
Last Change:            Sep 21, 2008
Password Expires:       Never
Password Inactive:      Never
Account Expires:        Never

Menentukan tanggal habis berlakunya password

$chage -E 2008/10/01 stogom
$chage -l stogom
Minimum:        0
Maximum:        99999
Warning:        7
Inactive:       -1
Last Change:            Sep 21, 2008
Password Expires:       Never
Password Inactive:      Never
Account Expires:        Oct 01, 2008

Menentukan jumlah hari minimum sebelum password dapat diganti

$chage -m 3 stogom
$chage -l stogom
Minimum:        3
Maximum:        99999
Warning:        7
Inactive:       -1
Last Change:            Sep 21, 2008
Password Expires:       Never
Password Inactive:      Never
Account Expires:        Oct 01, 2008

Kita dapat lihat bahwa user stogom tidak dapat mengganti passwordnya hari ini.

$su stogom
$passwd
Changing password for user stogom.
Changing password for stogom
(current) UNIX password:
You must wait longer to change your password
passwd: Authentication token manipulation error

Leave a Reply