Created
June 7, 2023 15:33
-
-
Save robertsinfosec/dc866cd1d13639e97393e02b871ddda4 to your computer and use it in GitHub Desktop.
Change the non-privileged user prompt to show the FQDN. Copy that in place for root, and make roots prompt red instead of green.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "[*] Show the full hostname in the prompt unprivileged prompt." | |
sed -i 's/\\h/$(hostname -f)/g' ~/.bashrc | |
source ~/.bashrc | |
echo "[*] Copy this file to /root/" | |
sudo cp ~/.bashrc /root/ | |
echo "[*] Change the root prompt to be red." | |
sudo sed -i 's/01;32m/01;31m/g' /root/.bashrc | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment