Skip to content

How to check when was the last time any local user password was changed in Unix?

How to check when was the last time any local user password was changed in Unix?

When ever any local user account password is changed the file /etc/shadow is updated.
So, if you want to check when was the last time any local user password was changed then just run:

[root@TestServer ~]# ls -lrt /etc/shadow
-r——– 1 root root 1035 Oct 11 11:11 /etc/shadow

From above output, its clear that last time any local user password was changed was on 11th Oct of this year.

For example, if you want to see when was the last time root user password was changed, just run below command:

[root@TestServer ~]# chage -l root
Last password change : Oct 11, 2016
Password expires : never
Password inactive : never
Account expires : never
Minimum number of days between password change : -1
Maximum number of days between password change : -1
Number of days of warning before password expires : -1

[Error 8017] [SQLState 28000] The UserId, Password or Account is invalid

ERROR:
Your lab group has not been created. [Teradata Database] [TeraJDBC 15.10.00.09] [Error 8017] [SQLState 28000] The UserId, Password or Account is invalid.

DESCRIPTION:
You may see above error while creating a new datalab group in viewpoint.

ISSUE:
You will see this error because the user with which you are creating data labs group do not have required permission on the underlying database where you are creating this data lab group.

RESOLUTION:
Grant below permissions to the user (sysdba in my example) and try creating the data lab group again.
GRANT USER ON DATALABS to sysdba;
GRANT CREATE ROLE to sysdba WITH GRANT OPTION;
GRANT EXECUTE ON DBC.LogonRule to sysdba;