PDA

View Full Version : Execute commands at user login



gala_dragos
4th September 2007, 07:35 PM
Hi! What file do I have to edit to add a few commands to be runned at each user login and/or logout ? I wanna add some mount commands for a few partitions to be mounted under that user so I can have rw access. If other ideas about this please share.

udev_dean
4th September 2007, 08:01 PM
/home/user/.bashrc will run when you log in.
/home/user/.bash_logout will run when you log out.

ms1234
4th September 2007, 08:01 PM
Best would be to check the man page of you shell (bash, zsh etc) as the files which are read and executed before login and logout are usually defined in them.

gala_dragos
6th September 2007, 10:25 AM
any file that gets executed no matter which user logs in or out?