On 1/17/07, Pieter de Goeje <[EMAIL PROTECTED]> wrote:

On Wednesday 17 January 2007 11:49, George Vanev wrote:
> Every time user X (for example) logs in the system
> I want to be executed some script.
> The user must not have the permission to
> change this behavior.
> Also the script must be run as root.
> Something like crontab, but depending on logins, not time
> Any ideas?!
If this user logs in via SSH you can use the ForceCommand keyword in
sshd_config(5) to execute your script. The root part can be achieved with

Pieter de Goeje

Thanks, nice idea. But it seams I can't use it.
Let me be more specific:
If user X logs in then I want to be run "/usr/bin/script -aq /path/user_X"
The file user_X must be protected from modifying/deleting

Could this be done?!

George Vanev
freebsd-questions@freebsd.org mailing list
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to