[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Login Procedure

Vaibhav Agrawal wrote:

I wanted to what is the sequence of files or scripts being executed when a user logs in.

Thank you.


Depends on the authorization system used, but the default in Debian i386 (PAM and friends) is to check the username/password against /etc/passwd and /etc/shadow. If the user is successfully authenticated, the shell or process listed as the last item on that user's line in /etc/passwd is fired off, which as a default is usually /bin/bash. At that point bash takes over and reads its start-up files, such as the .bashrc and .bash_profile files in the user's home directory, as well as system-wide scripts such as /etc/bash.bashrc.

This brief explanation assumes you're logging in from the console, not from a session manager such as kdm or wdm, which have their own sequences to be figured out.

This also does not address the sequence of files or scripts being executed at boot-time, which is not what your question concerns, but rather only what happens when a user logs in.


Reply to: