Thanks for your answer !

Yes afer checking more it runs fine just i was surprised to see no information on the shell

I have 50 users in my network and i would like it wrote in the same file

and only one time.

Could you explain to me how i can read a file and write only the information if the user has not been connected before ?

Thanks a lot for your advices !