Estou tentando gerar status de senha para o RedHat. Existe um equivalente de “password -s” no RedHat?

1

Como o título diz, estou tentando gerar status de senha para o RedHat.

Para minha máquina Solaris, consegui executar:

for i in 'more shadow | awk -F: '{print $1}''; do passwd -s $i; done

E isso me deu status de senha para todas as contas - Ex. PS, UN, UL, etc.

Existe um equivalente de "senha -s" para mostrar status de senha para RedHat?

    
por Andrew 14.09.2018 / 17:01

1 resposta

3

Eu só tenho uma máquina SuSE à mão, então leve isso com uma pitada de sal, mas é provável que a -S mude para passwd :

-S, --status

Display account status information. The status information consists of 7 fields. The first field is the user's login name. The second field indicates if the user account has a locked password (L), has no password (NP), or has a usable password (P). The third field gives the date of the last password change. The next four fields are the minimum age, maximum age, warning period, and inactivity period for the password. These ages are expressed in days.

Esta página man sugere que ele só esteja disponível para root no CentOS / RedHat; no SuSE, você também pode executar passwd --status para descobrir sua própria conta.

    
por 14.09.2018 / 17:25