How to get last login time of users through script?


Hi,

I want to find out last login time of the users in a OU, for this i
have written following script which gives me fullName, mail, and last
modified time but not lastLoginTime.
------------------------------------------------------------
export HOST=naam.lab.com

ldapsearch -b ou=internal,ou=Users,o=mynet \
-h ${HOST} \
-p 389 \
-D ou=internal,ou=Users,o=mynet \
-s sub fullName mail modifyTimestamp lastLoginTime
-------------------------------------------------------------

i have done attribute mapping in LDAP with eDir, by LDAP-->LDAP
Options-->attribute Mapping.
eDir Attribut LDAp Attribute
Last Login Time <> lastLogintime
Login Time <> loginTime

but still i didn't get any value from lastLoginTime and loginTime
attributes.

Does it required any more configuration for this?

please help!

Thanks in advance.


--
vaibhavkhare
------------------------------------------------------------------------
vaibhavkhare's Profile: http://forums.novell.com/member.php?userid=124227
View this thread: http://forums.novell.com/showthread.php?t=454058

Tags:

Parents
  • vaibhavkhare wrote:

    >
    > Hi,
    >
    > I want to find out last login time of the users in a OU, for this i
    > have written following script which gives me fullName, mail, and last
    > modified time but not lastLoginTime.
    > ------------------------------------------------------------
    > export HOST=naam.lab.com
    >
    > ldapsearch -b ou=internal,ou=Users,o=mynet \
    > -h ${HOST} \
    > -p 389 \
    > -D ou=internal,ou=Users,o=mynet \
    > -s sub fullName mail modifyTimestamp lastLoginTime
    > -------------------------------------------------------------
    >
    > i have done attribute mapping in LDAP with eDir, by LDAP-->LDAP
    > Options-->attribute Mapping.
    > eDir Attribut LDAp Attribute
    > Last Login Time <> lastLogintime
    > Login Time <> loginTime
    >
    > but still i didn't get any value from lastLoginTime and loginTime
    > attributes.
    >
    > Does it required any more configuration for this?
    >
    > please help!
    >
    > Thanks in advance.


    ldapsearch -H ldaps://10.200.200.40 -D cn=admin,o=admin -w novell -b
    cn=evandermaas,o=org -x loginTime

    # extended LDIF
    #
    # LDAPv3
    # base <cn=evandermaas,o=org> with scope subtree
    # filter: (objectclass=*)
    # requesting: loginTime
    #

    # EvanderMaas, org
    dn: cn=evandermaas,o=org
    loginTime: 20120328053253Z



    --
    Cheers,
    Edward
Reply
  • vaibhavkhare wrote:

    >
    > Hi,
    >
    > I want to find out last login time of the users in a OU, for this i
    > have written following script which gives me fullName, mail, and last
    > modified time but not lastLoginTime.
    > ------------------------------------------------------------
    > export HOST=naam.lab.com
    >
    > ldapsearch -b ou=internal,ou=Users,o=mynet \
    > -h ${HOST} \
    > -p 389 \
    > -D ou=internal,ou=Users,o=mynet \
    > -s sub fullName mail modifyTimestamp lastLoginTime
    > -------------------------------------------------------------
    >
    > i have done attribute mapping in LDAP with eDir, by LDAP-->LDAP
    > Options-->attribute Mapping.
    > eDir Attribut LDAp Attribute
    > Last Login Time <> lastLogintime
    > Login Time <> loginTime
    >
    > but still i didn't get any value from lastLoginTime and loginTime
    > attributes.
    >
    > Does it required any more configuration for this?
    >
    > please help!
    >
    > Thanks in advance.


    ldapsearch -H ldaps://10.200.200.40 -D cn=admin,o=admin -w novell -b
    cn=evandermaas,o=org -x loginTime

    # extended LDIF
    #
    # LDAPv3
    # base <cn=evandermaas,o=org> with scope subtree
    # filter: (objectclass=*)
    # requesting: loginTime
    #

    # EvanderMaas, org
    dn: cn=evandermaas,o=org
    loginTime: 20120328053253Z



    --
    Cheers,
    Edward
Children
No Data