Linux User info gathering commands
MONITORING USERS User-management is always one of the basic tasks for Linux administrators, here we are going to see some basics user related “Monitoring Commands”. 1) “finger” is a command which will give full details about user properties such as name, login, shell what he is using etc. Syntax: #finger username Example: [root@localhost ~]# finger root Login: root Name: root Directory: /root Shell: /bin/bash On since Sat Jun 6 19:20 (EDT) on tty1 4 hours 12 minutes idle On since Sun Jun 7 02:18 (EDT) on pts/0 from :0.0 On since Sun Jun 7 03:48 (EDT) on pts/1 from :0.0 16 minutes 9 seconds idle New mail received Sun Jun 7 04:02 2009 (EDT) Unread since Sat Jun 6 22:17 2009 (EDT) No Plan. Here you can see so many user related information one security information you can see is when he loged in last time and from where he loged in etc. 2)“id” is one more command which will show the user details such as his primary group and his secondary group. Syntax: #id username Example: [root@localhost ~]# id root uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel) context=root:system_r:unconfined_t:SystemLow–SystemHigh [root@localhost ~]# 3)“chage“ is one more command which is used to see user related “threshold details” such as user disable time etc. Syntax: #chage -l username Example: [root@localhost ~]# chage -l root Last password change : Jun 06, 2009 Password expires : never Password...
Read More