I want to read username and lastupdate only from /etc/security/passwd and write the s

Hi All,
As i asked you in my previous post, I want to read username and lastupdate only from /etc/security/passwd and write the same data to another file:
The data in /etc/security/passwd will be in this form for example:

smith:
password = MGURSj.F056Dj
lastupdate = 623078865
flags = ADMIN,NOCHECK

From this I want username i.e smith and value in lastupdate to be written to another file test.

Note: I should be able to write information of all users to test file in this format
smith:623078865