[root@10.1.1.1 ~]#
[root@10.1.1.1 ~]# passwd -l postgres
Locking password for user postgres.
passwd: Success
Check the user account status :
[root@10.1.1.1 ~]#
[root@10.1.1.1 ~]#
[root@10.1.1.1 ~]# passwd -S postgres
postgres LK 2022-10-04 -1 -1 -1 -1 (Password locked.)
[root@10.1.1.1 ~]#
[root@10.1.1.1 ~]#