linux查看最近3天的登陆日志,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      [...]

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值