Re: Is user active or not ?

David Guntner <davidg-1boXBf7wef/[email protected]> Thu, 22 Sep 2011 09:28:58 -0700
Newsgroups gmane.linux.mandrake.expert
Organization What a concept! :-)
Message-ID <[email protected]>
Stephen Kitchener grabbed a keyboard and wrote:
> On Thursday 22 Sep 2011, Renaud (Ron) Olgiati wrote:
>> I find myself in need of an easy way to check whether the account of a
>> remote user on the lan is active or not.
>>
>> Is there an easier way than to ssh, then grep $USER /etc/shaddow | grep !
>>
>> And is there a way to automate the ssh connection in a script ?
> 
> the commands "last" and "lastlog" as root, will show what you need I 
> believe...

I didn't know about those two; cool beans!  I just tried them out on my
machine - didn't need to be root to get a report via either of those.

                  --Dave
signature.asc (application/pgp-signature, 260 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk57YkoACgkQvC3peSYrMN5SQQCgqfzyz5Bwp/Il+BjcO73GM2s/
jwYAnRi3CYOqtR88SUntF/H5tq81b+6C
=dBZE
-----END PGP SIGNATURE-----