Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: Last Login time Netware
Also, please note that the value stored in the attribute "Login Time" is the value that is displayed as "Last Login Time" in NWADMIN. This value gets copied to the attribute "Last Login Time" each time you login to NDS, so your two most recent login date/time stamps are available via WinBatch [but only the most recent is available via NWADMIN].
Here is a sample script showing how to get these values using both the n4*() and nw*() functions.
AddExtender('wwn4x32i.dll') n4SetContext('[Root]','') username=askline("Username", "Please enter username [DN value]","") LoginTime = n4ObjGetVal('',username,'Login Time',0,0) LastLoginTime = n4ObjGetVal('',username,'Last Login Time',0,0) LoginTimeX = TimeAdd('1970:01:01:00:00:00',StrCat('0000:00:00:00:00:',LoginTime)) LastLoginTimeX = TimeAdd('1970:01:01:00:00:00',StrCat('0000:00:00:00:00:',LastLoginTime)) TempMsg = StrCat('Username = "',username,'"',@CRLF) TempMsg = StrCat(TempMsg,@CRLF,'Login Time (seconds since zero time) UTC: ',LoginTime) TempMsg = StrCat(TempMsg,@CRLF,'Login Time (YYYY:MM:DD:hh:mm:ss) UTC: "',LoginTimeX,'"') TempMsg = StrCat(TempMsg,@CRLF,'Last Login Time (seconds since zero time) UTC: ',LastLoginTime) TempMsg = StrCat(TempMsg,@CRLF,'Last Login Time (YYYY:MM:DD:hh:mm:ss) UTC: "',LastLoginTimeX,'"') Message('Result using n4*() functions:',TempMsg)
AddExtender('wwnwu34i.dll') nwSetContext(0,'[Root]','') LoginTime = nwGetObjValue(username,'Login Time',0,0,1) LastLoginTime = nwGetObjValue(username,'Last Login Time',0,0,1) LoginTimeX = TimeAdd('1970:01:01:00:00:00',StrCat('0000:00:00:00:00:',LoginTime)) LastLoginTimeX = TimeAdd('1970:01:01:00:00:00',StrCat('0000:00:00:00:00:',LastLoginTime)) TempMsg = StrCat('Username = "',username,'"',@CRLF) TempMsg = StrCat(TempMsg,@CRLF,'Login Time (seconds since zero time) UTC: ',LoginTime) TempMsg = StrCat(TempMsg,@CRLF,'Login Time (YYYY:MM:DD:hh:mm:ss) UTC: "',LoginTimeX,'"') TempMsg = StrCat(TempMsg,@CRLF,'Last Login Time (seconds since zero time) UTC: ',LastLoginTime) TempMsg = StrCat(TempMsg,@CRLF,'Last Login Time (YYYY:MM:DD:hh:mm:ss) UTC: "',LastLoginTimeX,'"') Message('Result using nw*() functions:',TempMsg) exit
Article ID: W14892
File Created: 2001:11:08:12:40:50
Last Updated: 2001:11:08:12:40:50