Next Previous Contents

10. Getty and Login

Getty is the program that enables you to log in through a serial device such as a virtual terminal, a text terminal, or a modem. It displays the login prompt. Once you enter your username, getty hands this over to login which asks for a password, checks it out and gives you a shell.

There are many getty's available, but the util-linux package, which includes login has one called agetty, which works fine. This package also contains clock, fdformat, mkswap, fdisk, passwd, kill, setterm, mount, swapon, rdev, renice, hexdump, more (the program) and more (ie more programs). To keep things simple by minimising the number of packages you have to install, I recommend using agetty.

10.1 Configuration

The message that comes on the top of your screen with your login prompt comes from /etc/issue. Gettys are usually started in /etc/inittab. Login checks user details in /etc/passwd, and if you have password shadowing, /etc/shadow.

10.2 Exercises

Create a /etc/passwd by hand. Passwords can be set to null, and changed with the program passwd once you log on. See the man page for this file Use man 5 passwd to get the man page for the file rather than the man page for the program.

10.3 More Information

The util-linux package contains login and agetty, and lots of other stuff that you will need.

There are lots of other getty's at Many getty's!. getty_ps is the most general one, mingetty is for virtual terminals only. However, the util-linux package which you need for logon also contains agetty, which works fine.


Next Previous Contents