How do I put a text banner on CentOS 7?

Support for security such as Firewalls and securing linux
dobsonunit
Posts: 3
Joined: 2015/01/09 15:34:36

How do I put a text banner on CentOS 7?

Postby dobsonunit » 2015/01/09 15:39:03

Greetings,

My job requires the consoles to have a legal banner on them in both console and GUI mode. Console mode is easy enough. I can place the required text in the /etc/issue and/or /etc/motd file. But how do I put the information up in GNOME in CentOS 7?

dobsonunit

dobsonunit
Posts: 3
Joined: 2015/01/09 15:34:36

Re: How do I put a text banner on CentOS 7?

Postby dobsonunit » 2015/01/09 20:32:59

I would like to answer my own question solving how to put a text banner on CentOS 7 graphical console.

The answer is on any CentOS 7 box; I just had to find it.

The instructions are in the file /usr/share/help/C/system-admin-guide/login-banner-page. The instructions start on line number 41 of that file with an example starting on line 52. The summary is:

As root,
cd /etc/dconf/db/gdm.d/

Create a new file:
vi 01-banner-message

Into that file put the information:
[org/gnome/login-screen]
banner-message-enable=true
banner-message-text="Place your text here. Carriage returns are a problem."

Save the file and exit.

If you want to disable the display of user ID strings from the graphical console, add the following line into the 01-banner-message file:
disable-user-list=true

As root, run the command "dconf update". The "dconf update" command must be run after any new/additional saved changes to this file. If the terminal window prompt returns without any other info, then the dconf update has completed properly. The banner-message-text will be visible in CentOS 7 when the user is on the screen prompting for a password.

If you have any comments/improvements to this, please feel free to share!

Thank you.
megan

dalemcbane
Posts: 1
Joined: 2015/02/09 20:21:32

Re: How do I put a text banner on CentOS 7?

Postby dalemcbane » 2015/02/10 15:17:44

Thanks for the post...very useful.

As far as carriage returns being difficult, use \n anywhere you need a carriage return.

peterwkc
Posts: 8
Joined: 2015/11/02 12:17:24

Re: How do I put a text banner on CentOS 7?

Postby peterwkc » 2015/11/03 05:36:18

I'm find the guide is a bit misleading and not clear enough. It would be helpful if you edit the guidance into step by step mode.

Dr4gonf1y
Posts: 15
Joined: 2017/02/24 15:30:36

Re: How do I put a text banner on CentOS 7?

Postby Dr4gonf1y » 2017/02/28 20:11:58

Sorry to ressurect this old thread, but I've tried this exact procedure and it is not working. I have remembered to do the dconf update and I also tried rebooting afterwards. Has this changed?

ravalox
Posts: 1
Joined: 2017/04/07 12:07:21

Re: How do I put a text banner on CentOS 7?

Postby ravalox » 2017/04/07 12:11:02

I had no problem following dobsonunit's instructions on how to setup a login banner for Centos7 Gnome. They worked as described.

Auristoc
Posts: 2
Joined: 2016/03/15 00:16:48

Re: How do I put a text banner on CentOS 7?

Postby Auristoc » 2017/08/22 21:26:51

I too had no problem setting up a warning banner on CentOS 7.3.1611 following dobsonunit's instructions.
Thanks much!