linux:misc:motd_banner_bashrc

no way to compare when less than two revisions

Differences

This shows you the differences between two versions of the page.


linux:misc:motd_banner_bashrc [2019/10/31 09:05] (current) – created - external edit 127.0.0.1
Line 1: Line 1:
 +====== BASH pre login / post login banners and scripts ======
 +Display message to local client - before login /etc/issue
 +<code bash |/etc/issue>
 +*********************************
 +*         Ccompany ltd.         *
 +*********************************
 +* - Authorized access only!     *
 +* - Activity is recorded        *
 +*********************************
 +</code>
 +
 +Display message to ssh client - before login /etc/issue.net
 +<code bash |/etc/ssh/sshd_config - enable banner on SSH>
 +Banner /etc/issue.net
 +</code>
 +
 +<code bash |/etc/issue.net - displayed before SSH login>
 +*********************************
 +*         Ccompany ltd.         *
 +*********************************
 +* - Authorized access only!     *
 +* - Activity is recorded        *
 +*********************************
 +</code>
 +
 +Execute script after successful login (displaying messages via ECHO)
 +<code bash |/etc/profiles.d/banner.sh - executed after successful login>
 +#!/bin/bash
 +alias ll='ls -ahls --color=auto'
 +BLACK="\033[0;30m"
 +RED="\033[0;31m"
 +GREEN="\033[0;32m"
 +ORANGE="\033[0;33m"
 +BLUE="\033[0;34m"
 +PURPLE="\033[0;35m"
 +CYAN="\033[0;36m"
 +LIGHTGRAY="\033[0;37m"
 +DARKGRAY="\033[1;30m"
 +LIGHTRED="\033[1;31m"
 +LIGHTGREEN="\033[1;32m"
 +YELLOW="\033[1;33m"
 +LIGHTBLUE="\033[1;34m"
 +LIGHTPUTPLE="\033[1;35m"
 +LIGHTCYAN="\033[1;36m"
 +WHITE="\033[1;37m"
 +NC="\033[0m"
 +
 +BOLD="\033[1mBold"
 +DIM="\033[2mDim"
 +UNDERLINE="\033[4mUnderlined"
 +BLINK="\033[5mBlink"
 +INVERT="\033[7mInverted"
 +HIDDEN="\033[8mHidden"
 +
 +NOTBOLD="\033[21mNormal"
 +NOTDIM="\033[22mNormal"
 +NOTUNDERLINE="\033[24mNormal"
 +NOTBLINK="\033[25mNormal"
 +NOTINVERT="\033[27mNormal"
 +NOTHIDDEN="\033[28mNormal"
 +
 +echo -e "${RED}---------------------------------------------------------------------------------"
 +echo -e "${YELLOW}Edit zone ..........: ${WHITE}sudo vim /etc/bind/example.hr.zone"
 +echo -e "${YELLOW}Check zone .........: ${WHITE}sudo named-checkzone example.hr /etc/bind/example.hr.zone"
 +echo -e "${YELLOW}Reload single zone .: ${WHITE}sudo rndc reload example.hr"
 +echo -e "${YELLOW}Restart Bind .......: ${WHITE}sudo systemctl restart bind9"
 +echo -e "${CYAN}-> Always change serial number => YYYYMMDDNN"
 +echo -e "${YELLOW}Text editor is run by lower caps ${WHITE}'k'"
 +echo -e "${RED}---------------------------------------------------------------------------------${NC}"
 +</code>
 +
 +
 +
  
  • linux/misc/motd_banner_bashrc.txt
  • Last modified: 2019/10/31 09:05
  • by 127.0.0.1