Como executo comandos no arquivo Banner antes do login do servidor Ubuntu

0

Então eu preciso mostrar a hora atual, data e número de usuários logados em um servidor Ubuntu, eu eddited o banner, mas eu não posso executar comandos nele. Preciso executar um script para isso ou existe uma maneira de executar comandos em um arquivo de texto como o banner?

Obrigado antecipadamente

    
por Pedro 01.10.2016 / 15:45

1 resposta

1

No meu Ubuntu 14.05.5, o "banner" ou Mensagem-do-dia ( motd ) é produzido através da execução de vários scripts. Você poderia adicionar o seu para este processo. Comece lendo man update-motd , que diz, em parte:

NAME
       update-motd - dynamic MOTD generation

SYNOPSIS
       /etc/update-motd.d/*

DESCRIPTION
       UNIX/Linux system adminstrators often communicate important information
       to console and remote users by maintaining text in the file  /etc/motd,
       which  is  displayed  by  the  pam_motd(8)  module on interactive shell
       logins.

       Traditionally, this file is static text,  typically  installed  by  the
       distribution  and  only  updated on release upgrades, or overwritten by
       the local administrator with pertinent information.

       Ubuntu introduced the update-motd framework, by which  the  motd(5)  is
       dynamically assembled from a collection of scripts at login.
    
por waltinator 01.10.2016 / 16:18