Customizing the Login Message (Solaris 2.0–2.3)

Solaris versions 2.0–2.3 and Solaris 2.4 differ in how they set up the pre-login message. These instructions are for Solaris 2.0–2.3. For Solaris 2.4, see “Customizing the Login Message (Solaris 2.4-higher)” .

You can change the message displayed when login executes by using the -p option of ttyadm. This option can be used to display a fixed string (Login please), to display the contents of a file (`cat /etc/myloginmsg`) or to run a text-producing program (`uname -n` login).

In fact, Sun's default /etc/inittab produces the console login prompt with a combination of a fixed string and a program's output.

 co:234:respawn:/usr/lib/saf/ttymon -g -h -p "`uname -n` console login: " -T sun -d /dev/console ...

Get Solaris™ 8 Advanced System Administrator's Guide, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.