How to view the status of password in Linux .How to view the status of password in Linux .

How to view the status of password in Linux, this task is sometime very challenging for Linux admin team member or users who work individually. Lets have discuss today about how to check the password status in Linux machine and it’s terminology.

vicky@pwr-VirtualBox:~$ passwd -S vicky

vicky P 10/28/2022 0 99999 7 -1

Linux command : passwd -S vicky
passwd (-S – stand for status – should be in capital) + account (vicky).

Lets discuss the below terminology and how the passing parameter work in command result.

1. who is holding the account/user – vicky
2. P – stand for – password is in usable status.
( other status could be – l – for lock, Np – no password)
3. 10/28/2022 – 28th October 2022 – password has been change.
4. 0 – stand for password used today or recently with older than a day.
5. 99999 – password never will be expire – it will stay forever or it will expiry after 99999 days.
6. 7 – it’s warning period when user password expire before 7 days the alerts will trigger when user try to login.so with in this 7 days user should change the password otherwise it will expire.
7. -1 – it will lock with in one day after password expire.

To check the account exits or not try below :

Linux command :  grep ‘^vicky’ /etc/passwd

vicky@pwr-VirtualBox:~$ grep ‘^vicky’ /etc/passwd
vicky:x:1001:1001:vicky:/home/vicky:/bin/bash.

To see all user account  list : please try below.

Linux command :  cat /etc/passwd

vicky@pwr-VirtualBox:~$ cat /etc/passwd
root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin

 

You can also read this amazing article in below link :

Create a function in Linux Script which will tell us the average of total number.

You can watch this video to understand more about validation of password status.

How to view the status of password in Linux machine.

 

One thought on “How to view the status of password in Linux”

Leave a Reply

Your email address will not be published. Required fields are marked *

Netflix’s Overall Architecture. Gold is money every thing else is credit