免费注册 查看新帖 |

Chinaunix

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

如何记录用户登录和退出的时间? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2005-11-25 12:41 |只看该作者 |正序浏览
现在需要在短时间内记录几个用户的登录和退出时间(qinter内的),如何能很快的方便的获取呢?

论坛徽章:
0
15 [报告]
发表于 2005-12-07 17:31 |只看该作者

试试这个

先为用户设置Initial program将Job name,User name,Job Number信息记录到文件中,然后用命令
DSPLOG JOB(033362/USERNAME/DSP01) MSGID(CPF1124 CPF1164)

论坛徽章:
0
14 [报告]
发表于 2005-11-30 22:43 |只看该作者
一般是利用AS/400的审记功能来起到监控用户操作或监控对敏感数据的访问,这样比较有意义。

如果要仅仅只显示用户登陆/退出的时间,估计要通过写代码才能过滤干净的数据。

论坛徽章:
1
荣誉版主
日期:2011-11-23 16:44:17
13 [报告]
发表于 2005-11-30 18:58 |只看该作者
如果需要在signoff 的时候,强制记点东西,可以给signoff加个校验程序,记个登陆退出是没问题的。但作为安全应用审计,还是只能通过对目标、对事件的审计完成。应该说400的审计功能还是相当强大的。

论坛徽章:
0
12 [报告]
发表于 2005-11-30 17:00 |只看该作者
直接处理WRKACTJOB中的信息得了.

论坛徽章:
0
11 [报告]
发表于 2005-11-30 16:36 |只看该作者
我们当前的系统监控sesion。但是每个用户都定义一个UID 。

论坛徽章:
0
10 [报告]
发表于 2005-11-30 15:02 |只看该作者
以下方法不知道是否可行:
1、为该用户单独定制JobD,如MYJOBD,在MYJOBD中指定RTGDTA参数为特定字符串,如:"MYDATA"
2、将该用户的简要表中的JobD参数修改为MYJOBD
3、定制一个路由入口程序MYENTCMD。
  PGM
         /* ADD Record Start-time Process Here */
          ...
  
         Call QCMD

         /* ADD Record End-Time Process Here */
           ...
      ENDPGM

将该程序编译到 MYLIB下

4、ADDRTGE   SBSD(QINTER) SEQNBR(800)  CMPVAL("MYDATA")  PGM(MYLIB/MYENTCMD)

5、完成

论坛徽章:
0
9 [报告]
发表于 2005-11-27 20:00 |只看该作者
修改singoff命令,记录下登陆的joblog的方法有个弊端
如果用户直接关闭窗口,就会造成无法记录

论坛徽章:
0
8 [报告]
发表于 2005-11-27 11:03 |只看该作者
我瞎想一下,有没有这种可能:(我在微机端这么做过),就是修改signoff的cl命令,使在signoff时获取系统时间;为用户属性增加一个字段--退出时间,将上述signoff时获取的系统时间写进该字段。
简单说就是现在400只有“上次登录时间”,没有“上次结束时间”--能否加一个呢?我不知道。

另:居士兄2楼的方法我还没有试,仔细看了一下,是否是:也是通过修改系统jobd的默认值,记录或者不记录job期间运行的cl命令,但都是有登录和退出时间的?会否即使不记录cl命令,splf(log)内还是很多内容?明天上班试一下。

大家动脑筋好好玩。

论坛徽章:
0
7 [报告]
发表于 2005-11-27 10:17 |只看该作者
gpm 说的方法我测试了一下。看不到用户的登陆退出信息。

另外MSG ID : CPIAD0B的描述如下:

                                                            
Message ID . . . . . . . . . :   CPIAD0B                                       
Message file . . . . . . . . :   QCPFMSG                                       
   Library  . . . . . . . . . :     QSYS                                       
                                                                                
Message . . . . :   *SIGNON server job &3/&2/&1 processing request for user &4
   on &5 in subsystem &6 in &7.                                                
Cause . . . . . :   The *SIGNON server is processing request &8 for user &4.   
   The types of requests supported are as follows:                              
     1 -- Retrieve Signon Information                                          
     2 -- Change Password                                                      
     3 -- Generate Authentication Token                                         
     4 -- Generate Authentication Token on Behalf of Another User               
     5 -- Start Server                                                         
                                                                                




Display the history log
Each time a client user successfully connects to a server job, that job is swapped to run under the profile of that client user. To determine which job is associated with a particular client user, you can display the history log with the DSPLOG command. Look for the messages starting with:

CPIAD0B (for signon server messages)
CPIAD09 (for messages relating to all other servers)


signon 服务的描述:

Signon server
The Signon server provides security for clients. This security function prevents access to the system by users with expired passwords, validates user profile passwords and returns user profile security information for use with password caching and iSeries(TM) Navigator Application Administration.

The programs listed in the following table are included with this server.
Signon server programs Program name  Library  Description  
QZSOSIGN  QSYS  Server program  
QZSOSGND  QSYS  Daemon program  


所以,gpm 说的signon服务,不是说的用户登陆,而是指系统的一个服务。所以我认为gpm说的方法是有问题的。
  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP