154ca Console screen - The FreeBSD Forums
The FreeBSD Forums  

Go Back   The FreeBSD Forums > Base System > General

General General questions about the FreeBSD operating system. Ask here if your question does not fit elsewhere.

Reply
 
Thread Tools Display Modes
  #1  
Old August 3rd, 2012, 21:59
xy16644 xy16644 is offline
Member
 
Join Date: Jul 2009
Posts: 509
Thanks: 14
Thanked 7 Times in 3 Posts
Default Console screen

I have noticed that when I sit at the console of my server (which is very rare) I have noticed that there is plenty of output on the screen about people logging in remotely (via SSH) and a few other lines of info that appear.

Is it possible to turn ALL of this output off on the console so that when someone looks at the screen ALL they see is the login prompt?
Reply With Quote
  #2  
Old August 4th, 2012, 00:28
wblock@'s Avatar
wblock@ wblock@ is offline
Moderator
 
Join Date: Sep 2009
Location: Milky Way galaxy
Posts: 7,850
Thanks: 444
Thanked 1,828 Times in 1,494 Posts
Default

Press alt-f2.
Reply With Quote
  #3  
Old August 4th, 2012, 14:10
jmccue jmccue is offline
Junior Member
 
Join Date: Nov 2008
Posts: 18
Thanks: 2
Thanked 5 Times in 5 Posts
Default

syslog.conf or
$ man syslog.conf
see /dev/console

John
Reply With Quote
  #4  
Old August 11th, 2012, 15:07
xy16644 xy16644 is offline
Member
 
Join Date: Jul 2009
Posts: 509
Thanks: 14
Thanked 7 Times in 3 Posts
Default

Quote:
Originally Posted by jmccue View Post
syslog.conf or
$ man syslog.conf
see /dev/console

John
I think thats what I was looking for. I ended up commenting out:
Code:
#*.err;kern.warning;auth.notice;mail.crit               /dev/console
in the /etc/syslog.conf and restarted the service:
Code:
/etc/rc.d/syslogd restart
I'll monitor it to see if it does the trick! Thanks!
Reply With Quote
  #5  
Old August 11th, 2012, 21:21
phoenix's Avatar
phoenix phoenix is offline
Moderator
 
Join Date: Nov 2008
Location: Kamloops, BC, Canada
Posts: 3,178
Thanks: 43
Thanked 715 Times in 587 Posts
Default

if you do that, you should also uncomment the line for /var/log/console.log, so you don't miss anything important.
__________________
Freddie

Help for FreeBSD: Handbook, FAQ, man pages, mailing lists.
Reply With Quote
  #6  
Old August 11th, 2012, 21:26
xy16644 xy16644 is offline
Member
 
Join Date: Jul 2009
Posts: 509
Thanks: 14
Thanked 7 Times in 3 Posts
Default

Quote:
Originally Posted by phoenix View Post
if you do that, you should also uncomment the line for /var/log/console.log, so you don't miss anything important.
Thanks for that. I funny enough did uncomment it as follows:
Code:
console.info                                    /var/log/console.log
But my /var/log/console.log is not showing any new entries even after I have logged on a few times since making this change. Is this due to me commenting out the console line?

I would like to log this activity but I don't want anything to appear on the console screen.
Reply With Quote
  #7  
Old August 14th, 2012, 03:51
phoenix's Avatar
phoenix phoenix is offline
Moderator
 
Join Date: Nov 2008
Location: Kamloops, BC, Canada
Posts: 3,178
Thanks: 43
Thanked 715 Times in 587 Posts
Default

Did you restart syslog after editing the file?
# service syslog reload

(might be restart instead of reload)
__________________
Freddie

Help for FreeBSD: Handbook, FAQ, man pages, mailing lists.
Reply With Quote
  #8  
Old August 14th, 2012, 07:55
izotov izotov is offline
Member
 
Join Date: Feb 2010
Location: Budapest, Hungary
Posts: 117
Thanks: 7
Thanked 6 Times in 6 Posts
Default

Quote:
Originally Posted by xy16644 View Post
But my /var/log/console.log is not showing any new entries even after I have logged on a few times since making this change.
If the same message appears several times one after the other only then syslog(3) waits till the last event occurs, prints one message only and a line saying something similar to "the last message repeated x times".
If the login event was the only that should have been written to your log file then the same might happen to you.
Try playing with logger(1) to test syslog(3) settings. And always send a message different from the previous.
Reply With Quote
  #9  
Old August 14th, 2012, 08:06
xy16644 xy16644 is offline
Member
 
Join Date: Jul 2009
Posts: 509
Thanks: 14
Thanked 7 Times in 3 Posts
Default

Thanks all!

What I ended up doing in/etc/syslog.conf was commenting out:
Code:
#*.err;kern.warning;auth.notice;mail.crit               /dev/console
and the copying the above line to a new line and changing it to:
Code:
*.err;kern.*;authpriv.none;mail.crit             /dev/console
I then added :
Code:
auth.notice                                     /var/log/console.log
and made sure this was uncommented:
Code:
console.info                                    /var/log/console.log
and restarted the service:
Code:
/etc/rc.d/syslogd restart
Now when I am sitting at the console the *only* thing I can see on the screen (currently) is the login prompt and my server name. This is exactly what I wanted. Its clean and more secure as its not displaying who is logging on remotely and what their usernames are.

I am curious to know if you can remove the server s hostname from the login prompt? That would be very nice if that was possible!
Reply With Quote
  #10  
Old August 14th, 2012, 11:37
izotov izotov is offline
Member
 
Join Date: Feb 2010
Location: Budapest, Hungary
Posts: 117
Thanks: 7
Thanked 6 Times in 6 Posts
Default

Quote:
Originally Posted by xy16644 View Post
I am curious to know if you can remove the server s hostname from the login prompt? That would be very nice if that was possible!
It might be possible. This thread may help you suggesting using gettytab(5).
Reply With Quote
  #11  
Old August 14th, 2012, 21:21
xy16644 xy16644 is offline
Member
 
Join Date: Jul 2009
Posts: 509
Thanks: 14
Thanked 7 Times in 3 Posts
Default

Aaaah thanks for the link to that thread. I think if I remove "%h" from my /etc/gettytab file it will remove the hostname.

Once this change is made, is there a service that you need to restart for the change to take effect? Or is a reboot required?
Reply With Quote
  #12  
Old August 15th, 2012, 11:11
izotov izotov is offline
Member
 
Join Date: Feb 2010
Location: Budapest, Hungary
Posts: 117
Thanks: 7
Thanked 6 Times in 6 Posts
Default

Quote:
Originally Posted by xy16644 View Post
Once this change is made, is there a service that you need to restart for the change to take effect? Or is a reboot required?
My gess is that already running terminals will display according to the old configuration, so they need a restart. I think an escape to single user mode and come back to multiuser would be enough (this is faster than a reboot but take care: network connections are lost, users are thrown out):
# shutdown now
Hit enter when it asks for the shell path. Now you are in single user mode. Go back to multiuser.
# exit
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Widescreen console? Miklos Mobile Computing 6 January 22nd, 2011 23:08
disable console messages and clear screen on boot viento General 10 August 2nd, 2010 14:31
Change console screen saver without rebooting vincepoy General 12 February 9th, 2010 02:05
from boot to gdm without seeing console. engine252 General 4 August 23rd, 2009 01:05
[Solved] High-Res Console and Screen Saver Conflict Android1 Installing & Upgrading 8 May 9th, 2009 20:28


All times are GMT +1. The time now is 16:17.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
The mark FreeBSD is a registered trademark of The FreeBSD Foundation and is used by The FreeBSD Project with the permission of The FreeBSD Foundation.
Web protection and acceleration provided by CloudFlare
0