User tasks in ~/.logout



I have some users who I want to "schedule" a specific job
for which gets executed on their user account. For some
of them, it will be twice a day, for others just once a
month. It should happen at logout time.

The intended mechanism to do so is ~/.logout, the C shell's
logout script.

Example: The user quits his work (shell "exit" or ending
a custom program that is executed by the shell),
now the ~/.logout shoult be executed, e. g. copying his
current datasets to "immediate backup" (or other means of
processing).

I assume I cannot use this approach when the user runs
his specific program _as_ the shell (per /etc/passwd),
but that's not a problem now, as it's easier to give
a regular shell and use ~/.login to "auto-exec" the
user-specific program).

My question is: As users connect to the system per SSH,
how much time will the "at logout time" process have to
finish work, or does it work _any_ time after the user
has (1st) logged out and (2nd) terminated SSH connection
(e. g. disconnect from SSH CLI client or PuTTY)?

Will such a ~/.logout job finish even if the user closes
his connection right after logout?

And just in case a user does not properly log out (e. g.
closes PuTTY right from the open session, maybe from within
the program or shell he currently runs), will this cause
~/.logout to be processed, or will it be a "stale connection"?



--
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
_______________________________________________
freebsd-questions@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: CVS over ssh question
    ... > our CVS repository securely over an encrypted connection, ... > has been put on me, namely that the remote developers not be allowed shell ... > that while still allowing CVS access over ssh. ...
    (comp.os.linux.security)
  • CVS over ssh question
    ... our CVS repository securely over an encrypted connection, ... that while still allowing CVS access over ssh. ... I've tried using /bin/false as a shell as well as a simple text file ...
    (comp.os.linux.security)
  • Re: User tasks in ~/.logout
    ... It should happen at logout time. ... The user quits his work (shell "exit" or ending ... As users connect to the system per SSH, ... has logged out and terminated SSH connection ...
    (freebsd-questions)
  • Re: (email) server connection problem : Help
    ... The connection is refused. ... shell$ ssh -l LoginName mail.anadarkohs60.com ... The authenticity of host 'mail.domain_4.com' can't be established. ... ssh: connect to host mail.domain_3.org port 22: Connection refused ...
    (freebsd-questions)
  • Re: (email) server connection problem : Help
    ... shell$ ssh -l LoginName mail.anadarkohs60.com ... you've instructed SSH to treat the host key as invalid; the connection will be closed. ...
    (freebsd-questions)