Skip to content

Posts tagged ‘Unix’

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

How to mount media in Unix

1.Log on to youe UNIX/Linux srever as root or sudo to root.
2.Place the compact disk (CD) in the media tray.
3.Run “ls /media” to check if the media path is cdrom or cdrecorder
4. Mount the disk by running bellow command:
mount /media/cdrom
OR
mount /media/cdrecorder

To unmount just use the command unmount instead of mount.