mikebai.com

  • Home
  • dev
  • DotNET
  • M365
  • 搞笑
  • 杂七杂八
  • FocusDict
個人BLOG
it developer
  1. Main page
  2. dev
  3. Main content

linux The login sequence

2020-05-21 143hotness 0likes 0comments

It's worth understanding at least those files in the login sequence that will affect things like whether you can login in the first place, where your initial environment comes from, and so on. At the risk of over-simplifying, here are the files you need to worry about that are invoked/consulted every time you log in (indented in an attempt to show who actually consults who):

/etc/passwd                     1
/etc/shadow                     2
/etc/group                      3

/etc/profile                    4
/etc/profile.d/*.sh             5

~/.bash_profile                 6
~/.bashrc                       7
/etc/bashrc                     8
  

1

/etc/passwd defines, among other things, the username, numeric UID and GID of the user, the home directory and the login shell. For security reasons, the encrypted password is no longer stored in this file.

2

/etc/shadow represents a more secure place to store things like the encrypted password, password aging information and more. (This is the only file in this list of files that requires root privilege to display.)

3

/etc/group defines the working groups on the host, along with the users who are members of those groups.

4 
Tag: Nothing
Last updated:2020-05-21

mikebai

This person is a lazy dog and has left nothing

Like
< Last article
Next article >

COPYRIGHT © 2025 mikebai.com. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang