免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1059 | 回复: 0
打印 上一主题 下一主题

1 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-06-22 13:53 |只看该作者 |倒序浏览
who命令从/var/adm/utmpx中读取信息
The command reads the binary file
/var/adm/utmpx to obtain this information and information about where
the users logged in from.


The who -m command outputs information about only the current
terminal window.


rusers -l从/usr/lib/netsvc/rusers/rpc.rusersd读取信息


finger -l
finger -m从/etc/passwd文件读取信息


last 从/var/adm/wtmpx文件读取信息
last -n 5 reboot
reboot system boot Wed Feb 20 13:20
reboot system boot Wed Feb 20 13:18
reboot system boot Fri Feb 1 12:46
reboot system boot Thu Jan 17 09:02
reboot system boot Thu Jan 17 08:55

# last user9
user9 console :0 Mon Dec 17 10:38 still logged in
user9 console :0 Fri Dec 14 10:18 - 10:25 (00:07)
(output truncated


You can log failed command-line login attempts in the
/var/adm/loginlog file.默认情况下,此文件不存在,需手动建立
# touch /var/adm/loginlog
# chown root:sys /var/adm/loginlog
# chmod 600 /var/adm/loginlog

su - username

who am i

$ su user2
password: EnterPassword
$ who am i
user1 pts/2 Dec 17 12:18 (129.147.4.12)
An alternative to the who am i command is the who -m command.


whoami    The whoami command resides in the /usr/ucb directory.

$ whoami
user1
$ pwd
/export/home/user1
$ su
password: EnterPassword
# whoami
root



Dec 17 12:35:47 sys41 su: [ID 810491 auth.crit] ’su root’ failed for
usera on /dev/pts/2
会记录到/var/adm/messages下面


/etc/default/su文件里可指定su命令记录的日志位置,默认是/va/adm/sulog文件
# more /var/adm/sulog
SU 10/20 14:50 + console root-sys
SU 10/20 16:55 + pts/2 user3-root
SU 11/05 11:21 - pts/3 user1-root


有密码的用户,在登陆时会经过文件/etc/hosts.equiv 、 $HOME/.rhosts的验证
这两个文件系统默认不存在
The host names in the /etc/hosts.equiv and $HOME/.rhosts files must
be the official name of the host, not one of its alias names.

The /etc/hosts.equiv file is not checked at all if the remote user
requesting local access is the root user.







本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u1/40476/showart_326403.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP