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
How do I put a text banner on CentOS 7?
-
- Posts: 3
- Joined: 2015/01/09 15:34:36
Re: How do I put a text banner on CentOS 7?
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
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
-
- Posts: 1
- Joined: 2015/02/09 20:21:32
Re: How do I put a text banner on CentOS 7?
Thanks for the post...very useful.
As far as carriage returns being difficult, use \n anywhere you need a carriage return.
As far as carriage returns being difficult, use \n anywhere you need a carriage return.
Re: How do I put a text banner on CentOS 7?
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.
Re: How do I put a text banner on CentOS 7?
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?
Re: How do I put a text banner on CentOS 7?
I had no problem following dobsonunit's instructions on how to setup a login banner for Centos7 Gnome. They worked as described.
Re: How do I put a text banner on CentOS 7?
I too had no problem setting up a warning banner on CentOS 7.3.1611 following dobsonunit's instructions.
Thanks much!
Thanks much!