LINUX查看用户登陆信息和日志

LINUX查看用户登陆信息和日志
May 11, 2010 Posted by admin Comments (0)查看用户登陆信息: last[enter] (用户登录、退出系统的记录,系统重启、关机的记录。/var/log/wtmp )
      lastlog[enter]: 只是记录每个用户上次登录的时间,/var/log/lastlog
查看日历:cal[enter]
查看日期:date[enter]

Category: Post   Read Morelinux下查看用户组的信息
May 11, 2010 Posted by admin Comments (0)groups 查看当前登录用户的组内成员
groups gliethttp


查看gliethttp用户所在的组,以及组内成员
whoami 查看当前登录用户名
/etc/group文件包含所有组
/etc/shadow和/etc/passwd系统存在的所有用户名
luther@gliethttp:~$ cat /etc/passwd|grep `whoami`
luther:x:1000:1000:luther,,,:/home/luther:/bin/bash 得到当前登录的用户所在的组id为1000
luther@gliethttp:~$ cat /etc/group |grep 1000
luther:x:1000:

得到当前登录的用户所在组的组名为luther

Category: Post   Read Morelinux查看系统登录用户
May 11, 2010 Posted by admin Comments (0)Last login: Wed Jul 29 17:16:10 2009 from 192.168.1.77
    [root@dbrg-2 ~]# users
    root
    [root@dbrg-2 ~]# w
    17:57:30 up 93 days,  8:48,  1 user,  load average: 0.69, 0.85, 0.62
    USER     TTY      [...]

 

你可能感兴趣的:(linux,user,日历,login,Comments,2010)