User Tools

Site Tools


fbsd-motd

Customize Message of the day

Some post-install configuration and settings.

Customize Message of the day

Suppress Message of the day

Individual users may suppress the display of the the Message of the Day by creating a file named “.hushlogin” in their home directories.

In order to suppress the Message of the Day everywhere, create an empty /etc/motd.template

mv /etc/motd.template /etc/motd.template.dist
touch /etc/motd.template
service motd restart

Personalize Message of the day

Create e template banner and move it /etc/motd.template

As example, the following create a local file motd.template with the nice cowsay with the alert for unauthorized user.

cat <<EOF >>motd.template
    ---------------------------------------------
   | All connections are monitored and recorded. |
   | Disconnect IMMEDIATELY if not authorized!!! |
    ---------------------------------------------
                \   ^__^
                 \  (oo)\_______
                    (__)\       )\/\
                        ||----w |
                        ||     ||
EOF

Move the motd.tamplate file to etc/motd.template

mv motd.template /etc/motd.template
service motd restart

You can continue to next section building the FreeBSD - Login Banner With System Information.

This is the result of both, motd.template and the banner with the system information

Last login: Sat Jan 18 04:11:34 2025 from xxx.xxx.xxx.xxx
FreeBSD 14.2-RELEASE (GENERIC) releng/14.2-n269506-c8918d6c7412

    ---------------------------------------------
   | All connections are monitored and recorded. |
   | Disconnect IMMEDIATELY if not authorized!!! |
    ---------------------------------------------
                \   ^__^
                 \  (oo)\_______
                    (__)\       )\/\
                     §§ ||----w |
                        ||     ||

   Host: host.example.org (96.7.128.192)
    CPU: 0.1% user, 0.0% nice, 0.2% system, 0.1% interrupt, 99.5% idle
    Mem: 5584K Active, 651M Inact, 164M Wired, 40M Buf, 154M Free
   Swap: 0B used, 512M available, 0% capacity
 
   Load: 0.26, 0.30, 0.31
 Uptime: 2 hours, 10 minutes
 We are: 18 Jan, 04:18:01

fbsd-motd.txt · Last modified: January 2025 by admin

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki