Ubuntu quick question?

I am the system administrator for my university's CS lab, and I want to know if it is possible to run a command every time any user logs in through the console (not remotely).

If so, what files would I need to edit or what procedure do I need to go through?

Paco2010-10-25T08:55:44Z

Favorite Answer

There are a few ways to do it. One way is to put the command in /etc/profile and /etc/login. Make sure to check two things. 1. Is it an "interactive" shell? Don't do your thing if it's not. Second, check if the terminal is a pseudoterminal or a console. I forget the exact name of the real console devices, but that is what you check.

If its an interactive shell AND it's on the console, run your program. Test carefully. This can go very wrong.