0

So I'm currenly learing sysVinit. I know that at startup /bin/login has to be started in order to display a login prompt but I couldn't find a file that starts it. Is it started by default in terminals specified in inittab or what's going on there?

2

It is started by getty after the username is input.

  1. Init starts /bin/agetty (or another getty) on each terminal, according to inittab
  2. Getty initializes the terminal, shows /etc/issue and the "login:" prompt
  3. User enters the login name
  4. Getty execs /bin/login with the username as parameter
  5. Login shows the password prompt (internal or from PAM)

(Note: login was also used for remote Telnet logins (although not by ssh logins), and the process was similar: telnetd would show the username prompt, and would start login for password prompt.)

In systemd, the process is nearly the same: init starts agetty according to getty@<tty>.service, and agetty starts login.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.